<template>
    <div class="on-siteInspection-div-3"  :key="onSiteInspectionKey">
        <div style="width: 60%;margin: 5px auto 5px auto;" v-if="!currentRow.isTopTabs && currentRow.isZZState">
            <a-steps :current="currentSteps" size="small" >
                <a-step title="首次会议" >
                    <div slot="icon" class="steps-item-icon-box">1</div>
                </a-step>
                <a-step title="技术审评笔记">
                    <div slot="icon" class="steps-item-icon-box">2</div>
                </a-step>
                <a-step title="审评报告制作">
                    <div slot="icon" class="steps-item-icon-box">3</div>
                </a-step>
                <a-step title="末次会议">
                    <div slot="icon" class="steps-item-icon-box">4</div>
                </a-step>
            </a-steps>
        </div>
        <div class="nextStep-box" >
            <div>
                <div v-if="!reportStatus && currentRow.fhbsxzt == 1" class="left-bgBox-top" style="display: flex;align-items: center;margin-bottom: 0;border: 1px solid #d9d9d9;font-size: 16px;" @click="reportStatus = !reportStatus">
                    <span class="title">{{ selectReportItem.bgmc }}</span>
                    <a-icon type="double-left" />
                </div>
            </div>
            <div style="display: flex;align-items: center;" v-if="!currentRow.isTopTabs">
                <div style="margin-right:40px;" v-if="dataViewingStatus && currentSteps == 2">
                    <vxe-pulldown ref="pulldownRef" destroy-on-close>
                        <template #default>
                            <!-- <vxe-button status="primary" icon="vxe-icon-arrow-down" @click="clickEvent3">资料目录</vxe-button> -->
                            <a-button class="green-btn" type="primary" @click="clickEvent3" icon="down">资料目录</a-button>
                        </template>
                        <template #dropdown>
                            <div class="my-dropdown3 xcjvbj-coontent-v"  >
                                <div style="width:300px;overflow-y: auto;height: 300px;border: 1px solid #d9d9d9;" :style="{height:(windowInnerHeight - 220)+'px'}">
                                    <table border bordercolor="#d9d9d9" style="width: 100%; ">
                                        <tr>
                                            <th style="background:#5ca3e5;color:#fff;padding:5px;">
                                                <div style="display: flex;justify-content: space-between;align-items: center;">
                                                    <span style="font-size: 16px;">{{ xcjcNoteData.clmc }} </span>
                                                </div>
                                            </th>
                                        </tr>
                                        <tr v-if="xcjcNoteData.wjList" v-for="(item,index) in xcjcNoteData.wjList" :key="index">
                                            <td
                                            @click="selectmlNoteItem({...item,index:index})" 
                                            :class="item.id == currentXcjcMLNoteState.id?'select-XcjcNote-box':''" 
                                            class="XcjcNote-item-box" 
                                            style='color:#999;'
                                            >
                                                <span >{{ item.fwjxsmc+item.fwjlx }}</span>
                                                <!-- <a-icon type="delete" style="display: inline-block;margin: 0 5px;color: #ed5565;" @click.top.prevent="noteDelete({...item,index})"/> -->
                                            </td>
                                        </tr>
                                        <tr v-for="(item,index) in noticeMaterialDataList" :key="index">
                                            <td
                                                v-if="item.fwjxsmc || item.fclmc"
                                                @click="selectmlNoteItem({...item,index:index})" 
                                                :class="item.id == currentXcjcMLNoteState.id?'select-XcjcNote-box':''" 
                                                class="XcjcNote-item-box" 
                                                style='color:#999;'
                                            >
                                                <span >{{ item.fwjxsmc?(item.fwjxsmc+item.fwjlx):item.fclmc }}</span>
                                            </td>
                                            <th v-else style="background:#5ca3e5;color:#fff;padding:5px;">
                                                <div style="display: flex;justify-content: space-between;align-items: center;">
                                                    <span style="font-size: 16px;">{{ item.name =='企业申报材料'? '审评参考材料': item.name =='审评报告模板'?'任务报告模板':item.name}}</span>
                                                </div>
                                            </th>
                                            
                                        </tr>
                                    </table>
                                </div>
                            </div>
                        </template>
                    </vxe-pulldown>
                </div>
                <a-button v-if="currentSteps !== 0" class="blue-btn" style="margin:5px;" type="primary" @click="nextStepClick('上一步',currentSteps-1)" >上一步</a-button>
                <a-button v-if="currentSteps !== 3" class="blue-btn" style="margin:5px;" type="primary" @click="nextStepClick('下一步',currentSteps+1)" >下一步</a-button>
                <!-- <a-button v-if="currentSteps == 2 && activeKey=='审评总体情况'" class="blue-btn" style="margin:5px;" type="primary" @click="completeAllProjectClick" >批量完成审评项目</a-button> -->
                <span style="color: #ed5565;font-weight: 600;">（切换步骤）</span>
                <div>
                    <div
                     v-if="!dataViewingStatus" 
                     class="left-bgBox-top" style="display: flex;align-items: center;width: 150px;margin-bottom: 0;border: 1px solid #d9d9d9;font-size: 16px;margin-left: 50px;" 
                     @click="dataViewingStatus = !dataViewingStatus">
                        <a-icon type="double-right" />
                        <span class="title" style="text-align: right">查看资料</span>
                    </div>
                    <!-- <div
                     v-if="dataViewingStatus" 
                     class="left-bgBox-top" style="display: flex;align-items: center;width: 150px;margin-bottom: 0;border: 1px solid #d9d9d9;font-size: 16px;margin-left: 50px;" 
                     @click="dataViewingStatus = !dataViewingStatus">
                        <span class="title" style="text-align: center">资料目录</span>
                    </div> -->
                    
                </div>
            </div>
        </div>
        <div style="display: flex;" >
            <div class="sceneInspect-left-bgBox" v-if="currentSteps == 2 && currentRow.fhbsxzt == 1 && reportStatus">
                <div class="left-bgBox-top" style="display: flex;align-items: center;" @click="reportStatus = !reportStatus">
                    <span class="title">待完成报告</span>
                    <a-icon type="double-right" />
                </div>
                <div style="padding:5px;height: calc(100vh - 246px);overflow-y: auto;">
                    <div
                     class="left-bgBox-item" 
                     :class="item.sqsxid == selectReportItem.sqsxid?'select-left-bgBox-item':''"  
                     v-for="(item,index) in reportList" :key="index"
                     @click="selectReportClick(item,index)"
                    >
                        <span>{{item.order}}</span>.
                        <span>{{ item.bgmc }}</span>
                    </div>
                </div>
            </div>
            <div style="flex:1;" >
                <div v-if="!currentRow.isTopTabs">
                    <div class="process-handling-card" v-if="!currentRow.isTopTabs && currentSteps == 2" >
                        <a-tabs type="card" v-model:activeKey="activeKey" @change="tabPaneChange">
                            <!-- <a-tab-pane key="会议签到" tab="会议签到"></a-tab-pane> -->
                            <!-- <a-tab-pane key="审评方案拟定" tab="审评方案拟定"></a-tab-pane> -->
                            <a-tab-pane v-if="currentRow.isZZState" key="审评情况专述" tab="审评情况专述"></a-tab-pane>
                            <a-tab-pane key="审评总体情况" tab="审评总体情况"></a-tab-pane>
                            <a-tab-pane v-if="currentRow.isZZState" key="审评结论及其他说明" tab="审评结论及其他说明"></a-tab-pane>
                            <a-tab-pane v-if="currentRow.isZZState" key="审评报告" tab="审评报告制作"></a-tab-pane>
                            <a-tab-pane v-if="currentRow.isZZState" key="缺陷报告" tab="缺陷报告制作"></a-tab-pane>
                            <!-- <a-tab-pane v-if="currentRow.isZZState" key="技术审评材料汇总" tab="技术审评材料汇总"></a-tab-pane> -->
                            <!-- <a-tab-pane v-if="currentRow.isZZState" key="材料审查" tab="材料审查"></a-tab-pane> -->
                            <!-- <a-tab-pane key="申请信息" tab="事项信息"></a-tab-pane> -->
                            <!-- <a-tab-pane key="环节流转记录" tab="流转记录"></a-tab-pane> -->
                        </a-tabs>
                    </div>
                    
                </div>
                <div
                class="on-siteInspection-content" 
                :style="{height: currentRow.boxHeight? 'calc(100vh - '+currentRow.boxHeight+'px)':(currentRow.isTopTabs?'calc(100vh - '+168+'px)':(currentSteps == 2?'calc(100vh - '+230+'px)':'calc(100vh - '+199+'px)')),border:currentRow.isTopTabs?'none': '1px solid #38f',borderTop: currentSteps == 2?'0 !important':'1px solid #38f !important'}">
                    <div v-show="activeKey == '审评情况专述'&&currentSteps == 2" style="padding: 5px;" :key="reportTabKey">
                        <div>
                            <!-- <a-button style="margin-right: 15px;" class="blue-btn" type="primary" @click="selectDescribe()" icon="check-circle">选择描述模板</a-button> -->
                            <a-button style="margin-right: 15px;" class="blue-btn" type="primary" @click="saveData('fjcqkzs',selectReportItem.fjcqkzs)" icon="folder">保存</a-button>
                            <!-- <a-button style="margin-right: 15px;" class="blue-btn" type="primary" @click="addDescribe()" icon="folder">保存为描述模板</a-button> -->
                        </div>
                        <div style="margin-top: 10px;">
                            <a-textarea 
                                :key="reportValKey"
                                v-model:value="selectReportItem.fjcqkzs"
                                placeholder="请输入审评情况专述"
                                :autosize="{ minRows: 17, maxRows: 10000 }"
                            ></a-textarea>
                        </div>
                        <a-drawer
                            title="描述模板"
                            placement="right"
                            :closable="true"
                            :visible="drawerVisible"
                            @close="drawerVisible = false"
                            width="50%"
                        >
                            <div :key="drawerKey">
                                <a-radio-group name="radioGroup" v-model:value="fmbly" @change="fmblyChange" style="margin-bottom: 10px;">
                                    <a-radio value="个人">个人</a-radio>
                                    <a-radio value="审评中心">审评中心</a-radio>
                                    <a-radio value="其他审评员">其他审评员</a-radio>
                                </a-radio-group>
                                <div>
                                    <a-input-search
                                        :key="inputSearchKey"
                                        placeholder="请输入内容"
                                        enter-button="搜索"
                                        @search="onSearchDescribe"
                                    />
                                </div>
                                <div style="height: calc(100vh - 200px);overflow-y: auto;">
                                    <a-list :data-source="describeList" :loading="describeLoading">
                                        <a-list-item slot="renderItem" slot-scope="item, index" :key="index">
                                            <div style="width: 300px;" @click="selelctDescribeText(item.fmbnr)">{{ item.fmbnr }}</div>
                                            <span>{{ item.fdycs }}
                                                <span v-if="index !== 0">次</span>
                                            </span>
                                            <div slot="actions" v-if="fmbly == '个人'">
                                                <a-button v-if="index !== 0" size="small" class="red-btn" type="primary" @click="deleteDescribe(item)" icon="delete">删除</a-button>
                                                <span v-else style="width: 48px;display: inline-block;text-align: center;">操作</span>
                                            </div>
                                        </a-list-item>
                                    </a-list>
                                </div>
                                <a-pagination
                                v-if="totalDescribe"
                                :key="paginationKey"
                                show-size-changer
                                v-model="paginationDescribe.pageNo" 
                                :default-current="paginationDescribe.pageNo"
                                :total="totalDescribe" 
                                :page-size="paginationDescribe.pageSize"
                                @change="paginationChange"
                                @showSizeChange="paginationChange" />
                            </div>
                        </a-drawer>
                    </div>
                    <div v-show="activeKey == '审评总体情况'&&currentSteps == 2" style="position: relative;" :key="reportTabKey">
                        <div style="display: flex;align-items: center;justify-content: space-between;margin: 5px 15px;">
                            <div style="font-weight: 600;font-size: 16px;" :key="overallKey">
                                <span style="padding-right: 30px;">
                                    合计：
                                    <span style="color: #2F54EB;padding-right:5px;font-size: 20px;">{{ overallNum.hjSize }}</span>
                                    <span>章节</span>
                                </span>
                                <span style="padding-right: 30px;">
                                    完成审评：
                                    <span style="color: #05e659;padding-right:5px;font-size: 20px;">{{ overallNum.wcSize }}</span>
                                </span>
                                <span style="padding-right: 30px;">
                                    未完成：
                                    <span style="color: #f00707;padding-right:5px;font-size: 20px;">{{ overallNum.wwcSize }}</span>
                                </span>
                            </div>
                            <div v-if="currentRow.isZZState">
                                <!-- <a-button class="blue-btn" type="primary" @click="activeKey='审评结论及其他说明'" icon="arrow-right">下一步</a-button> -->
                            </div>
                            
                        </div>
                        <div style="display: flex;border: 1px solid #d9d9d9;margin: 0 15px;">
                            <div style="width: 22%;border-right: 1px solid #d9d9d9;padding: 5px;height: calc(100vh - 332px);overflow-y: auto;">
                                <div
                                v-for="(item,index) in chapterList" 
                                :key="index" 
                                style="padding: 5px;display: flex;align-items: flex-start;"
                                :style="{
                                    borderBottom:index+1 !== chapterList.length ?'1px solid #e6f7ff':'',
                                    backgroundColor:index == chapterRow.index?'#e6f7ff':'',
                                    color:index == chapterRow.index?'#2F54EB !important':'',
                                    fontWeight:index == chapterRow.index?'600':''}"
                                    @click="fzjmcClick(item,index)"
                                >
                                    <span style="font-size: 18px;" >{{ item.fzjmc }}</span>
                                    <div style="flex:1;" >
                                        <span style="font-size:10px;border:1px solid #ED5566;border-radius:10px;padding:0 6px;width:55px;display: flex;text-align: center;" :style="{color:item.fwczt == '已完成'?'#05e659':'#ED5566',borderColor:item.fwczt == '已完成'?'#05e659':'#ED5566',}">{{item.fwczt}}</span>
                                    </div>
                                    <!-- <a-select size="small" v-model:value="item.fwczt" @change="chapterStatusChange(item,index)">
                                        <a-select-option value="已完成">已完成</a-select-option>
                                        <a-select-option value="未完成">未完成</a-select-option>
                                    </a-select> -->
                                </div>
                            </div>
                            <div style="flex: 1;padding: 5px 10px;">
                                <div style="display:flex;align-items:center;">
                                    <h4 style="margin: 0;font-weight: 600;font-size: 28px;">{{ chapterRow.fzjmc }}</h4>
                                    <a-button @click="chapterStatusChange(chapterRow,chapterRow.index)" style="margin-left: 15px;" class="blue-btn" type="primary" :icon="chapterRow.fwczt == '未完成'?'check-circle':'edit'">{{chapterRow.fwczt == '未完成'?'完成':'重新编辑'}}</a-button>
                                </div>
                                <div v-if="chapterRow.fwczt == '未完成'">
                                    <div class="process-handling-card">
                                        <a-tabs type="card" v-model:activeKey="chapterActiveKey" @change="chapterTabPaneChange">
                                            <a-tab-pane key="情况描述" tab="情况描述"></a-tab-pane>
                                            <a-tab-pane key="发现问题" tab="发现问题"></a-tab-pane>
                                        </a-tabs>
                                    </div>
                                </div>
                                <div class="chapter-tabs-content" v-if="chapterRow.fwczt == '未完成'">
                                    <div v-if="chapterActiveKey == '发现问题'" style="display: flex;justify-content: flex-end;margin-right: 100px;">
                                        <!-- <a-button style="margin-right: 15px;" class="blue-btn" type="primary" @click="problemBaseSelect()" icon="check-circle">选择历史库</a-button> -->
                                        <a-button style="margin-right: 15px;" class="blue-btn" type="primary" @click="addproblem" icon="plus">添加问题</a-button>
                                    </div>
                                    <div :style="{height: chapterActiveKey == '情况描述'?'calc(100vh - 437px)':'calc(100vh - 468px)'}" style="overflow-y: auto;">
                                        <div v-show="chapterActiveKey == '情况描述'">
                                            <div style="margin: 10px 0;">
                                                <!-- <a-button style="margin-right: 15px;" class="blue-btn" type="primary" @click="situationClick()" icon="check-circle">选择描述</a-button> -->
                                                <a-button style="margin-right: 15px;" class="blue-btn" type="primary" icon="folder" @click="savechapter('fjcms',chapterRow.fjcms,chapterRow.id,chapterRow.index)" >保存</a-button>
                                                <!-- <a-button class="blue-btn" type="primary" >保存为常用描述</a-button> -->
                                            </div>
                                            <div>
                                                <a-textarea 
                                                    v-model:value="chapterRow.fjcms"
                                                    placeholder="请输入情况描述"
                                                    :autosize="{ minRows: 12, maxRows: 12 }"
                                                ></a-textarea>
                                            </div>
                                            <a-drawer
                                                title="情况描述"
                                                placement="right"
                                                :closable="true"
                                                :visible="situationDescriptionVisible"
                                                @close="situationDescriptionVisible = false"
                                                width="60%"
                                            >
                                                <div :key="chapterdrawerKey">
                                                    <a-radio-group name="radioGroup" v-model:value="chapterRadio"  @change="chapterRadioChange" style="margin-bottom: 10px;">
                                                        <a-radio value="我写过的描述">我写过的描述</a-radio>
                                                        <a-radio value="其他审评员写过的">其他审评员写过的</a-radio>
                                                        <a-radio value="该企业的描述">该企业的描述</a-radio>
                                                        <a-radio value="所有历史描述">所有历史描述</a-radio>
                                                    </a-radio-group>
                                                    
                                                    <div>
                                                        <!-- size="small" -->
                                                        <a-input-search
                                                            :key="inputSearchKey"
                                                            placeholder="请输入描述内容"
                                                            enter-button="搜索"
                                                            @search="onSearchSituation"
                                                        />
                                                    </div>
                                                    <div style="height: calc(100vh - 281px);overflow-y: auto;">
                                                        <a-list :data-source="situationList" :loading="situationLoading">
                                                            <a-list-item slot="renderItem" slot-scope="item, index" :key="index">
                                                                <div style="width: 300px;">{{ item.fmbnr }}</div>
                                                                <span>{{ item.fdycs }}
                                                                    <span v-if="index !== 0">次</span>
                                                                </span>
                                                                <div slot="actions" v-if="chapterRadio == '我写过的描述'">
                                                                    <a-button v-if="index !== 0" size="small" class="blue-btn" type="primary" @click="selectSituationText('fjcms',chapterRow.fjcms,chapterRow.id,chapterRow.index,item)" >选择</a-button>
                                                                    <span v-else style="width: 48px;display: inline-block;text-align: center;">操作</span>
                                                                </div>
                                                            </a-list-item>
                                                        </a-list>
                                                    </div>
                                                    <a-pagination
                                                    v-if="totalDescribe"
                                                    :key="paginationKey"
                                                    show-size-changer
                                                    v-model="paginationDescribe.pageNo" 
                                                    :default-current="paginationDescribe.pageNo"
                                                    :total="totalDescribe" 
                                                    :page-size="paginationDescribe.pageSize"
                                                    @change="paginationChange"
                                                    @showSizeChange="paginationChange" />
                                                </div>
                                            </a-drawer>
                                            <div v-if="currentRow.isZZState" style="width: 100%;display: flex;justify-content: flex-end;margin-top: 15px;">
                                                <!-- <a-button class="blue-btn" type="primary" @click="chapterActiveKey = '发现问题'" icon="arrow-right">下一步</a-button> -->
                                            </div>
                                        </div>
                                        <div v-show="chapterActiveKey == '发现问题'">
                                            <a-spin tip="正在加载中..." :spinning="chapterIssuesSpinning">
                                                <div :key="chapterIssuesKey">
                                                    <div :key="chapterIssuesKey" v-if="chapterIssuesList.length">
                                                        <div v-for="(item,index) in chapterIssuesList" :key="index" >
                                                            <div style="font-size: 16px;" class="discover-problems-item-box" >
                                                                <div style="display: flex;justify-content: space-between;">
                                                                    <div>
                                                                        <span class="problem-title">问题</span><!-- {{item.wt.forder}} -->
                                                                        <span style="color: #faad14;font-size: 14px;font-weight: 600;" >缺陷类型：</span>
                                                                        <a-select v-model="item.wt.fyzcd" @change="severityChange(item.wt,'fyzcd')" style="width: 110px;margin-right: 10px;" placeholder="请选择严重程度">
                                                                            <a-select-option value="一般缺陷">一般缺陷</a-select-option>
                                                                            <a-select-option value="主要缺陷">主要缺陷</a-select-option>
                                                                            <a-select-option value="严重缺陷">严重缺陷</a-select-option>
                                                                        </a-select>
                                                                        <a-button size="small" class="red-btn" type="primary" @click="deleteWTClick(item)" icon="delete">删除问题</a-button>
                                                                    </div>
                                                                </div>
                                                                <!-- style="border: 1px solid #d9d9d9;margin: 5px 0;" -->
                                                                <div style="display: flex;width: 100%;margin-top:5px;">
                                                                    <div class="qxms-box" >
                                                                        <div class="wt-item-top-box" style="height:30px;line-height:30px;">
                                                                            <span class="tips-box">*</span>
                                                                            <span class="wt-item-title">缺陷描述</span>
                                                                        </div>
                                                                        <a-textarea 
                                                                            @blur="severityChange(item.wt,'fwtms')"
                                                                            v-model:value="item.wt.fwtms"
                                                                            placeholder="请输入缺陷描述"
                                                                            :autosize="{ minRows: 5, maxRows: 5 }"
                                                                        ></a-textarea>
                                                                    </div>
                                                                    <div class="qxyj-box" >
                                                                        <div class="wt-item-top-box">
                                                                            <span class="tips-box">*</span>
                                                                            <span class="wt-item-title">缺陷依据</span>
                                                                            <a-button size="small" style="margin-left: 15px;" class="blue-btn" type="primary" @click="selectTermItem(item,{})" >选择对应依据</a-button>
                                                                        </div>
                                                                        <div class="qxyj-content">
                                                                            <div v-for="(trem,tIndex) in item.tkList" :key="tIndex">
                                                                                <div 
                                                                                style="border-top: 1px solid #d9d9d9;border-bottom: 1px solid #d9d9d9;
                                                                                padding: 3px 10px;display: flex;justify-content: space-between;align-items: center;"
                                                                                >
                                                                                    <span>对应依据：
                                                                                        <span style="color: #000;font-weight: 500;">{{ trem.tk }}</span>
                                                                                    </span>
                                                                                </div>
                                                                            </div>
                                                                            <div v-if="!item.tkList.length">
                                                                                <a-empty />
                                                                            </div>
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div v-else style="margin-top: 30px;">
                                                        <a-empty />
                                                    </div>
                                                
                                                
                                                    <a-drawer
                                                        title="问题历史库"
                                                        placement="right"
                                                        :closable="true"
                                                        :visible="problemHistoryVisible"
                                                        @close="problemHistoryVisible = false"
                                                        width="60%"
                                                    >
                                                        <div :key="problemHistoryKey">
                                                            <div>
                                                                <!-- size="small" -->
                                                                <a-input-search
                                                                    :key="problemHistoryKey"
                                                                    placeholder="请输入关键字"
                                                                    enter-button="搜索"
                                                                    @search="onSearchProblemHistory"
                                                                />
                                                            </div>
                                                            <div style="height: calc(100vh - 167px);overflow-y: auto;">
                                                                <a-list :data-source="problemHistoryList" :loading="problemHistoryLoading">
                                                                    <a-list-item slot="renderItem" slot-scope="item, index" :key="index">
                                                                        <div style="width: 300px;">{{ item.fwtms }}</div>
                                                                        <span>{{ item.fzdyzh }}</span>
                                                                        <div slot="actions">
                                                                            <a-button v-if="index !== 0" size="small" class="blue-btn" type="primary" @click="SelectproblemHistory(item)">选择</a-button>
                                                                            <span v-else style="width: 48px;display: inline-block;text-align: center;">操作</span>
                                                                        </div>
                                                                    </a-list-item>
                                                                </a-list>
                                                            </div>
                                                            <a-pagination
                                                            v-if="totalDescribe"
                                                            :key="paginationKey"
                                                            show-size-changer
                                                            v-model="paginationDescribe.pageNo" 
                                                            :default-current="paginationDescribe.pageNo"
                                                            :total="totalDescribe" 
                                                            :page-size="paginationDescribe.pageSize"
                                                            @change="paginationChange"
                                                            @showSizeChange="paginationChange" />
                                                        </div>
                                                    </a-drawer>
                                                    <a-drawer
                                                        title="选择条款"
                                                        placement="right"
                                                        :closable="true"
                                                        :visible="termItemVisible"
                                                        @close="termItemVisible = false"
                                                        width="60%"
                                                    >
                                                        <div :key="termItemKey">
                                                            <div>
                                                                <!-- size="small" -->
                                                                <a-input-search
                                                                    :key="termItemKey"
                                                                    placeholder="请输入关键字"
                                                                    enter-button="搜索"
                                                                    @search="onSearchTermItem"
                                                                />
                                                            </div>
                                                            <div style="height: calc(100vh - 167px);overflow-y: auto;">
                                                                <a-list :data-source="termItemList" :loading="termItemLoading">
                                                                    <a-list-item slot="renderItem" slot-scope="item, index" :key="index" :style="{backgroundColor:currentTerms.trem.ftkid == item.id?'#d9d9d9':''}">
                                                                        <div style="width: 300px;">{{ item.fzdyznr }}</div>
                                                                        <span>{{ item.fzdyzh }}</span>
                                                                        <div slot="actions">
                                                                            <!-- {{ item }}
                                                                            <br/>
                                                                            {{ currentTerms.trem }}
                                                                            <br/> -->
                                                                            <a-button v-if="index !== 0" size="small" class="blue-btn" type="primary" @click="SelectTermItemItem(item)">选择</a-button>
                                                                            <span v-else style="width: 48px;display: inline-block;text-align: center;">操作</span>
                                                                        </div>
                                                                    </a-list-item>
                                                                </a-list>
                                                            </div>
                                                            <a-pagination
                                                            v-if="totalDescribe"
                                                            :key="paginationKey"
                                                            show-size-changer
                                                            v-model="paginationDescribe.pageNo" 
                                                            :default-current="paginationDescribe.pageNo"
                                                            :total="totalDescribe" 
                                                            :page-size="paginationDescribe.pageSize"
                                                            @change="paginationChange"
                                                            @showSizeChange="paginationChange" />
                                                        </div>
                                                    </a-drawer>
                                                </div>
                                            </a-spin>
                                        </div>
                                    </div>
                                </div>
                                <div class="discover-problems-readOnly-box" v-else>
                                    <div class="problems-readOnly-item" >
                                        <span class="item-title">情况描述</span>
                                        <a-textarea 
                                            readOnly
                                            v-model:value="chapterRow.fjcms"
                                            placeholder="情况描述"
                                            :autosize="{ minRows: 2, maxRows: 12 }"
                                        ></a-textarea>
                                    </div>
                                    <div class="problems-readOnly-item">
                                        <span class="item-title">发现问题--<span style="font-size: 16px;color: #05e659;font-weight: 600;">{{ chapterIssuesList.length }}</span>项</span>
                                        <commpVxeTable
                                            :key="problemTableKey"
                                            ref="problemTableRef"
                                            :isCanWrap="true"
                                            :config="problemTableConfig" 
                                            :columns="problemTableColumnsVxe" 
                                            :formItem="[]"
                                            :tableDataList="chapterIssuesList"
                                            tablePadding="0"
                                            :adaptiveHeight="true"
                                        >
                                            <template v-slot:forder_default="{row}" >
                                                {{ row.wt.forder }}
                                            </template>
                                            <template v-slot:fyzcd_default="{row}" >
                                                {{ row.wt.fyzcd }}
                                            </template>
                                            <template v-slot:fwtms_default="{row}" >
                                                {{ row.wt.fwtms }}
                                                <span v-if="row.tkList.length">（
                                                    <span v-for="(item,index) in row.tkList">{{ item.tk }}{{ (index+1) == row.tkList.length?'':'、' }}</span>
                                                    ）
                                                </span>
                                                <!-- <a-textarea 
                                                    readOnly
                                                    v-model:value="row.wt.fwtms"
                                                    placeholder="缺陷描述"
                                                    :autosize="{ minRows: 1, maxRows: 5 }"
                                                ></a-textarea> -->
                                            </template>
                                        </commpVxeTable>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div >
                            <div style="display: flex;justify-content: center;" v-if="currentSteps == 2 && activeKey=='审评总体情况'">
                                <!-- <a-button class="blue-btn" style="margin:5px;" type="primary" @click="nextStepClick('上一步',currentSteps-1)" >上一步</a-button>
                                <a-button v-if="currentSteps !== 3" class="blue-btn" style="margin:5px;" type="primary" @click="nextStepClick('下一步',currentSteps+1)" >下一步</a-button> -->
                                <a-button  class="blue-btn" style="margin:5px;" type="primary" @click="completeAllProjectClick" >批量完成审评项目</a-button>
                            </div>
                        </div>
                    </div>
                    <div v-show="activeKey == '审评结论及其他说明'&&currentSteps == 2" :key="reportTabKey">
                        <div style="display: flex;justify-content: space-between;align-items: center;margin: 3px 0;">
                            <h3>审评结论：</h3>
                            <div style="margin-right: 100px;">
                                <a-button style="margin-right: 15px;" class="blue-btn" type="primary" @click="generateConclusion('fcyjl',selectReportItem.fcyjl)" icon="check-circle">生成结论</a-button>
                                <a-button style="margin-right: 15px;" class="blue-btn" type="primary" @click="saveData('fcyjl',selectReportItem.fcyjl)" icon="folder">保存</a-button>
                            </div>
                        </div>
                        <div>
                            <!-- v-model:value="selectReportItem.fcyjl" -->
                            <a-textarea 
                                :key="reportValKey"
                                v-model:value="selectReportItem.fcyjl"
                                placeholder="请输入审评结论"
                                :autosize="{ minRows: 8, maxRows: 8 }"
                            ></a-textarea>
                        </div>
                        <div style="display: flex;justify-content: space-between;align-items: center;margin: 3px 0;margin-top: 20px;">
                            <h3>其他说明：</h3>
                            <div style="margin-right: 100px;">
                                <a-button style="margin-right: 15px;" class="blue-btn" type="primary" @click="saveData('fcyqtwt',selectReportItem.fcyqtwt)" icon="folder">保存</a-button>
                            </div>
                        </div>
                        <div>
                            <a-textarea 
                                :key="reportValKey"
                                v-model:value="selectReportItem.fcyqtwt"
                                placeholder="请输入其他说明"
                                :autosize="{ minRows: 2, maxRows: 5 }"
                            ></a-textarea>
                        </div>
                        <div style="display: flex;justify-content: space-between;align-items: center;margin: 3px 0;margin-top: 20px;">
                            <h3>审评缺陷项：</h3>
                            <div style="margin-right: 100px;">
                                <a-button style="margin-right: 15px;" class="blue-btn" type="primary" @click="saveData('fjcqxxm',selectReportItem.fjcqxxm)" icon="folder">保存</a-button>
                            </div>
                        </div>
                        <div>
                            <a-textarea 
                                :key="reportValKey"
                                v-model:value="selectReportItem.fjcqxxm"
                                placeholder="请输入审评缺陷项"
                                :autosize="{ minRows: 6, maxRows: 6 }"
                            ></a-textarea>
                        </div>
                        <!-- <div style="width: 100%;display: flex;justify-content: flex-end;margin-top: 15px;">
                            <a-button style="margin-right: 96px;" class="blue-btn" type="primary" @click="activeKey = '审评报告'" icon="arrow-right">下一步</a-button>
                        </div> -->
                    </div>
                    <div v-show="activeKey == '审评报告' && currentSteps == 2" :key="reportTabKey">
                        <div v-if="programData.id" :key="programKey">
                            <div>
                                <a-button
                                style="margin-right: 15px;" 
                                class="blue-btn" type="primary" 
                                @click="refreshFile" icon="reload">刷新</a-button>

                                <a-button
                                style="margin-right: 15px;" 
                                class="blue-btn" type="primary" 
                                @click="downloadFiles(programData)" icon="download">下载签字</a-button>

                                <a-button
                                v-if="programData.fwjlx == '.pdf'"
                                style="margin-right: 15px;" 
                                class="blue-btn" type="primary" 
                                @click="reEdit" icon="form">重新编辑</a-button>

                                <a-button
                                v-if="programData.fwjlx !== '.pdf'"
                                style="margin-right: 15px;" 
                                class="blue-btn" type="primary" 
                                @click="saveFiles" icon="folder">保存</a-button>

                                <!-- <a-button
                                v-if="programData.fwjlx !== '.pdf'"
                                style="margin-right: 15px;" 
                                class="blue-btn" type="primary" 
                                @click="generatePDFClick">生成PDF</a-button>

                                <a-button
                                v-if="programData.fwjlx == '.pdf'"
                                style="margin-right: 15px;" 
                                class="blue-btn" type="primary" 
                                @click="stampClick">盖章</a-button>

                                <a-button
                                v-if="programData.fwjlx !== '.pdf'"
                                style="margin-right: 15px;"
                                class="blue-btn" type="primary" 
                                @click="generatePDFStampClick">生成PDF并盖章</a-button> -->

                                <a-button 
                                v-if="programData.fwjlx !== '.pdf'"
                                class="blue-btn" type="primary" 
                                @click="reSelectTemplate" icon="select">重新选择模板</a-button>
                            </div>
                            <div :key="iframeKey" style="display: flex;justify-content: center;">
                                <iframe 
                                    v-if="programDataiframeSrc"
                                    :key="iframeKey"
                                    :src="programDataiframeSrc" 
                                    ref="iframeServerEditingRef" 
                                    scrolling="auto" 
                                    width="100%"
                                    :height="(windowInnerHeight -295 )+'px'"
                                    style="border: 0;"
                                ></iframe>
                                <span v-else>当前文件发生错误，请刷新！</span>
                            </div>
                            <!-- {{ programData }} -->
                        </div>
                        <div v-if="!programData.id && activeKey == '审评报告'">
                            <span style="color: red;font-weight: 600;">(注：当前暂无审评报告文件，请先选择模板进行审评报告制作)</span>
                            <selectTemplateNoModel ref="selectTemplateNoModelRef" @selectTemplateComplete="selectTemplateCompleteNoModel" :fhbsxzt="currentRow.fhbsxzt" />
                        </div>
                        <!-- <div style="width: 100%;display: flex;justify-content: flex-end;margin-top: 15px;">
                            <a-button class="blue-btn" type="primary" @click="activeKey = '缺陷报告'" icon="arrow-right" style="margin-right: 15px;">下一步</a-button>
                        </div> -->
                    </div>
                    <div v-show="activeKey == '缺陷报告'&&currentSteps == 2" :key="reportTabKey">
                        <div v-if="defectReportData.id" :key="defectReportKey">
                            <div>
                                <a-button
                                style="margin-right: 15px;" 
                                class="blue-btn" type="primary" 
                                @click="refreshFile" icon="reload">刷新</a-button>

                                <a-button
                                style="margin-right: 15px;" 
                                class="blue-btn" type="primary" 
                                @click="downloadFiles(defectReportData)" icon="download">下载签字</a-button>

                                <a-button
                                v-if="defectReportData.fwjlx == '.pdf'"
                                style="margin-right: 15px;" 
                                class="blue-btn" type="primary" 
                                @click="reEdit" icon="form">重新编辑</a-button>

                                <a-button
                                v-if="defectReportData.fwjlx !== '.pdf'"
                                style="margin-right: 15px;" 
                                class="blue-btn" type="primary" 
                                @click="saveFiles" icon="folder">保存</a-button>

                                <a-button
                                v-if="defectReportData.fwjlx !== '.pdf'"
                                style="margin-right: 15px;" 
                                class="blue-btn" type="primary" 
                                @click="generatePDFClick" icon="file-pdf">生成PDF</a-button>

                                <!-- <a-button
                                v-if="defectReportData.fwjlx == '.pdf'"
                                style="margin-right: 15px;" 
                                class="blue-btn" type="primary" 
                                @click="stampClick" icon="audit">盖章</a-button>

                                <a-button
                                v-if="defectReportData.fwjlx !== '.pdf'"
                                style="margin-right: 15px;"
                                class="blue-btn" type="primary" 
                                @click="generatePDFStampClick" icon="audit">生成PDF并盖章</a-button> -->

                                <a-button 
                                v-if="defectReportData.fwjlx !== '.pdf'"
                                class="blue-btn" type="primary" 
                                @click="reSelectTemplate" icon="select">重新选择模板</a-button>
                            </div>
                            <div :key="iframeKey" style="display: flex;justify-content: center;">
                                <iframe 
                                    v-if="defectReportDataiframeSrc"
                                    :key="iframeKey"
                                    :src="defectReportDataiframeSrc" 
                                    ref="iframeServerEditingRef" 
                                    scrolling="auto" 
                                    width="100%"
                                    :height="(windowInnerHeight -295 )+'px'"
                                    style="border: 0;"
                                ></iframe>
                                <span v-else>当前文件发生错误，请刷新！</span>
                            </div>
                            <!-- {{ defectReportData }} -->
                        </div>
                        <div v-if="!defectReportData.id && activeKey == '缺陷报告'">
                            <span style="color: red;font-weight: 600;">(注：当前暂无缺陷报告文件，请先选择模板进行缺陷报告制作)</span>
                            <selectTemplateNoModel ref="selectTemplateNoModel2Ref" @selectTemplateComplete="selectTemplateCompleteNoModel" :fhbsxzt="currentRow.fhbsxzt"/>
                        </div>
                        <!-- <div style="width: 100%;display: flex;justify-content: flex-end;margin-top: 15px; ">
                            <a-button style="margin-right: 15px;" class="blue-btn" type="primary" @click="activeKey = '技术审评材料汇总'" icon="arrow-right">下一步</a-button>
                        </div> -->
                    </div>
                    <a-drawer
                        :title="reportName"
                        placement="right"
                        :closable="true"
                        :visible="reportTemplateVisible"
                        @close="reportTemplateVisible = false"
                        width="50%"
                    >
                        <div :key="reportTemplateKey">
                            <a-radio-group name="radioGroup" v-model:value="reportTemplatefmbly" @change="reportTemplateRadioChange" style="margin-bottom: 10px;">
                                <a-radio value="个人">个人</a-radio>
                                <a-radio value="审评中心">审评中心</a-radio>
                                <a-radio value="其他审评员">其他审评员</a-radio>
                            </a-radio-group>
                            <div>
                                <a-input-search
                                    :key="reportTemplateKey"
                                    placeholder="请输入内容"
                                    enter-button="搜索"
                                    @search="onSearchReportTemplate"
                                />
                            </div>
                            <div style="height: calc(100vh - 200px);overflow-y: auto;">
                                <a-list :data-source="reportTemplateList" :loading="reportTemplateLoading">
                                    <a-list-item slot="renderItem" slot-scope="item, index" :key="index">
                                        <div style="width: 300px;" @click="selelctDescribeText(item.fmbnr)">{{ item.fmbnr }}</div>
                                        <span>{{ item.fdycs }}
                                            <span v-if="index !== 0">次</span>
                                        </span>
                                        <div slot="actions" v-if="fmbly == '个人'">
                                            <a-button v-if="index !== 0" size="small" class="red-btn" type="primary" @click="deleteDescribe(item)" icon="delete">删除</a-button>
                                            <span v-else style="width: 48px;display: inline-block;text-align: center;">操作</span>
                                        </div>
                                    </a-list-item>
                                </a-list>
                            </div>
                            <a-pagination
                            v-if="totalDescribe"
                            :key="paginationKey"
                            show-size-changer
                            v-model="paginationDescribe.pageNo" 
                            :default-current="paginationDescribe.pageNo"
                            :total="totalDescribe" 
                            :page-size="paginationDescribe.pageSize"
                            @change="paginationChange"
                            @showSizeChange="paginationChange" />
                        </div>
                    </a-drawer>
                    <!-- v-if="activeKey == '会议签到' -->
                    <div v-if="currentSteps == 0 && !currentRow.isTopTabs" class="first-meeting-content-box">
                        <onSiteInspectionCheckInIndex ref="onSiteInspectionCheckInIndexRef" @completeRegistrationChange="completeRegistrationChange('首次会议')" />
                        <div v-if="firstMeetingAndAttachmentData.length">
                            <div class="process-handling-card" :key="firstMeetingDataKey">
                                <a-tabs type="card" v-model:activeKey="firstMeetingActiveValue" @change="firstMeetingTabChange">
                                    <a-tab-pane v-for="(item,index) in firstMeetingAndAttachmentData" :key="index" :tab="item.yq"></a-tab-pane>
                                </a-tabs>
                            </div>
                            <div class="content-tabs-item-box">
                                <div style="width: 50%;">
                                    <commpVxeTable
                                        :key="firstMeetingTableKey"
                                        ref="firstMeetingTableRef"
                                        :isCanWrap="true"
                                        :config="firstMeetingTableConfig" 
                                        :columns="firstMeetingTableColumnsVxe" 
                                        :formItem="[]"
                                        :tableDataList="firstMeetingTableDataList"
                                    >
                                        <template v-slot:frylx_default="{row}">
                                            {{ row.frylx }}
                                            <span v-if="row.fjcsf">（{{row.fjcsf}}）</span>
                                        </template>
                                        <template v-slot:gxnr_default="{row}">
                                            <span v-if="row.wlysmsz == 'true'">本人保证以上声明全部属实，继续参加本次技术审评工作。如有不实，愿承担因此导致的一切后果。</span>
                                            <span v-if="row.wlylyct == 'true'">
                                                <span v-if="row.wlysmsz == 'true'">/</span>
                                                本人声明与被审评单位有利益冲突关系，主动提出退出本次技术审评工作。
                                            </span>
                                            <span v-if="row.wlysfczlygx == 'true'">
                                                <span v-if="row.wlysfczlygx == 'true'">/</span>
                                                本人声明与被审评单位有可能存在利益关系，建议提交审查中心审议是否可继续参加本次技术审评工作。
                                            </span>
                                        </template>
                                        
                                        <template v-slot:fuserid_default="{row}">
                                            <img v-if="row.fhyqdrq"style="width: 86px;height: 40px;" :src="row.fqmfj" alt="/">
                                        </template>
                                        
                                    </commpVxeTable>
                                </div>
                                <div style="flex: 1;">
                                    <!-- currentFirstMeetingData.clmc == '技术审评纪律'?firstMeetingMaterialColumnsVxe:firstMeetingMaterialColumnsVxe1 -->
                                    <commpVxeTable
                                        :key="firstMeetingMaterialKey"
                                        ref="firstMeetingMaterialRef"
                                        :isCanWrap="true"
                                        :config="firstMeetingTableConfig" 
                                        :columns="firstMeetingMaterialColumnsVxe1" 
                                        :formItem="[]"
                                        :tableDataList="firstMeetingMaterialList"
                                        :adaptiveHeight="firstMeetingAdaptiveHeight"
                                    >
                                        <template v-slot:clmc_default="{row}">
                                            {{ row.clmc?row.clmc:currentFirstMeetingData.clmc }}
                                        </template>
                                        <template v-slot:wjList_default="{row}">
                                            <div style="display: flex;flex-direction: column;align-items: flex-start;">
                                                <div v-if="row.wjList" class="file-for-box">
                                                    <div style="display: flex;flex-wrap: wrap;">
                                                        <div v-for="(trem,tIndex) in row.wjList" class="toolbox-fileList-box"
                                                        style="display: flex;align-items: center;flex-direction: row;height: auto;">
                                                            
                                                            <div class="toolbox-file-coontern" style="margin-right: 5px;flex: 1;">
                                                                <a-tooltip placement="rightBottom">
                                                                    <template slot="title">
                                                                    <span>{{ trem.fwjxsmc+trem.fwjlx }}</span>
                                                                    </template>
                                                                    <span class="toolbox-file-name" style="-webkit-line-clamp: 1;"><a href="#">{{ trem.fwjxsmc+trem.fwjlx }}</a></span>
                                                                </a-tooltip>
                                                                
                                                            </div>
                                                            <div class="fileList-icon-btn" style="flex: none;">
                                                                <a-icon type="download" class="toolbox-download-icon-type" style="display: inline-block;margin-right: 5px;font-size:16px;" @click="downloadFiles(trem)"/>
                                                                <a-icon type="eye" class="toolbox-eye-icon-type" style="padding: 0;margin: 0;margin-right: 5px;" @click="viewClick(trem)" v-if="trem.type == '.pdf'"/>
                                                                <a-icon type="delete" class="toolbox-delete-icon-type" style="display: inline-block;margin-right: 5px;" @click="producerDelete(trem)"/>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                                <div v-else class="file-for-box">
                                                    <div class="toolbox-fileList-box"
                                                        style="display: flex;align-items: center;flex-direction: row;height: auto;">
                                                            
                                                            <div class="toolbox-file-coontern" style="margin-right: 5px;flex: 1;">
                                                                <a-tooltip placement="rightBottom">
                                                                    <template slot="title">
                                                                    <span>{{ row.fwjxsmc+row.fwjlx }}</span>
                                                                    </template>
                                                                    <span class="toolbox-file-name" style="-webkit-line-clamp: 1;"><a href="#">{{ row.fwjxsmc+row.fwjlx }}</a></span>
                                                                </a-tooltip>
                                                                
                                                            </div>
                                                            <div class="fileList-icon-btn" style="flex: none;">
                                                                <a-icon type="download" class="toolbox-download-icon-type" style="display: inline-block;margin-right: 5px;font-size:16px;" @click="downloadFiles(row)"/>
                                                                <a-icon type="eye" class="toolbox-eye-icon-type" style="padding: 0;margin: 0;margin-right: 5px;" @click="viewClick(row)" v-if="row.type == '.pdf'"/>
                                                                <a-icon type="delete" class="toolbox-delete-icon-type" style="display: inline-block;margin-right: 5px;" @click="producerDelete(row)"/>
                                                            </div>
                                                        </div>
                                                </div>
                                            </div>
                                        </template>
                                        <template v-slot:options_default="{row}">
                                            <div style="display: flex;justify-content: space-between;flex-wrap: wrap;align-items: center;">
                                                <!-- <a-button
                                                    v-if="row.clmc == '技术审评会议签到表'"
                                                    class="green-l-btn" 
                                                    style="margin:3px 0;margin-right: 5px;width: 124px;"
                                                    type="primary" @click="generateFilesClick(row.clmc)" icon="check-circle"
                                                >生成签到表</a-button> -->

                                                <a-button
                                                    class="green-l2-btn" 
                                                    style="margin:3px 0;margin-right: 5px;width: 124px;"
                                                    type="primary" @click="selectFileCahnge(row.clmc)" icon="download"
                                                >下载模板</a-button>

                                                <a-button
                                                    v-if="row.clmc == '技术审评会议签到表' || row.clmc == '技术审评纪律'"
                                                    class="green-btn" 
                                                    style="margin:3px 0;margin-right: 5px;width: 124px;"
                                                    type="primary" @click="signatureFormCahnge(row.clmc)" icon="download"
                                                >下载签字模板</a-button>
                                                <!-- v-if="row.clmc !== '技术审评纪律'" -->
                                                <a-upload style="display: inline-block;" :beforeUpload="$event=>{return false}" :showUploadList="false" action="" @change="singleUploadCahnge($event,row.clmc)">
                                                    <a-button
                                                    class="blue-btn" 
                                                    style="width: 124px;margin-right: 3px;"
                                                    type="primary" icon="upload">上传</a-button>
                                                </a-upload>
                                                <a-button
                                                    v-if="row.clmc == '技术审评纪律'"
                                                    class="orange-btn" 
                                                    style="margin:3px 0;margin-right: 5px;width: 124px;"
                                                    type="primary" @click="recitingDisciplineCahnge" icon="eye"
                                                >宣读审评纪律</a-button>
                                            </div>
                                        </template>
                                    </commpVxeTable>
                                    
                                </div>
                            </div>
                        </div>
                        <div style="display: flex;justify-content: center" v-else>
                            <a-empty />
                        </div>
                        <div style="display: flex;justify-content: flex-start;margin-top: 10px;align-items: center">
                            <a-button
                            class="blue-btn" 
                            type="primary" 
                            style="margin-right: 10px;" 
                            @click="taskAllocationClick()" icon="apartment"
                            >{{currentRow.isRwfpFlag?'技术审评任务分配':'重新分配审评任务'}}</a-button>
                            <a-button
                                class="blue-btn" 
                                type="primary" @click="packageDownloadClick()" icon="download"
                            >下载移交企业的材料</a-button>
                        </div>
                        <!-- <div class="nextStep-box">
                            <a-button style="margin: 5px;" class="blue-btn" type="primary" @click="nextStepClick('下一步',1)" >下一步</a-button>
                        </div> -->
                    </div>
                    <div v-if="currentSteps == 1 && !currentRow.isTopTabs" style="display: flex;" class="xcjvbj-coontent-v" >
                        <div style="border: 1px solid #d9d9d9;height: calc(100vh - 220px);overflow-y: auto;">
                            <!-- xcjcNoteData -->
                            <table border bordercolor="#d9d9d9" style="width: 330px; ">
                                <tr>
                                    <th>
                                        <div style="display: flex;justify-content: space-between;align-items: center;">
                                            <span style="font-size: 18px;">{{ xcjcNoteData.clmc }} </span>
                                            <a-upload style="display: inline-block;" :beforeUpload="$event=>{return false}" :showUploadList="false" action="" @change="singleUploadCahnge1($event,xcjcNoteData.clmc)">
                                                <a-button
                                                class="blue-btn" 
                                                type="primary" icon="upload">上传技术审评笔记</a-button>
                                            </a-upload>
                                        </div>
                                    </th>
                                </tr>
                                <tr v-if="xcjcNoteData.wjList" v-for="(item,index) in xcjcNoteData.wjList" :key="index">
                                    <td @click="selectNoteItem({...item,index:index})" :class="index == currentXcjcNoteState.index?'select-XcjcNote-box':''" class="XcjcNote-item-box" >
                                        <span>{{ item.fwjxsmc+item.fwjlx }}</span>
                                        <a-icon type="delete" style="display: inline-block;margin: 0 5px;color: #ed5565;" @click.top.prevent="noteDelete({...item,index})"/>
                                    </td>
                                </tr>
                            </table>
                        </div>
                        <div style="flex: 1;margin-left: 10px;border: 1px solid #d9d9d9;height: calc(100vh - 220px);overflow-y: auto;" >
                            <a-button class="blue-btn" style="margin: 10px;"ype="primary" icon="download" @click="downloadFiles(currentXcjcNoteState)">下载</a-button>
                            <a-button class="blue-btn" style="margin: 10px;"ype="primary" icon="form" @click="changeFileNameClick(currentXcjcNoteState)">修改文件名</a-button>
                            <a-spin tip="正在加载中..." :spinning="cjcNoteSpinning">
                                <iframe :src="xcjcNoteIframeSrc" width="100%" :height="(windowInnerHeight - 288)+'px'"  v-if="xcjcNoteIframeSrc"></iframe>
                                <div v-else>
                                    <a-empty description="暂无文件或文件发生错误！"/>
                                </div>
                            </a-spin>
                        </div>
                    </div>
                    <div v-if="(currentSteps == 3 && !currentRow.isTopTabs) || activeKey == '技术审评材料汇总'">
                        <!-- <div style="display: flex;justify-content: flex-end;" v-if="!currentRow.isTopTabs">
                            <a-button
                            class="blue-btn" 
                            type="primary" @click="satisfactionClick">满意度调查二维码</a-button>
                        </div> -->
                        <div
                            v-if="!currentRow.isTopTabs"
                            style="
                                display:flex;
                                justify-content:space-between;
                                padding:10px;
                                background:#dbe6f2;
                                align-items:center;
                                border:1px solid #e4e3e3;
                                border-bottom:0;
                            "
                            :style="{marginTop:currentSteps == 5?'10px':'0'}"
                        >
                            <span style="font-size:16px;font-weight:600;">末次会议</span>
                            <div style="color:#2F54EB;">
                                <span v-if="lastMeetingDisplay" style="display:flex;align-items:center;" @click="lastMeetingDisplay = false;">
                                    <span style="padding-right:3px">折叠   </span>
                                    <a-icon type="down" />
                                </span>
                                <span v-if="!lastMeetingDisplay" style="display:flex;align-items:center;" @click="lastMeetingDisplay = true">
                                    <span style="padding-right:3px">展开</span>
                                    <a-icon type="up" />
                                </span>
                            </div>
                        </div>
                        <div v-show="lastMeetingDisplay" style="display: flex;border: 1px solid #e4e3e3;padding: 10px;" v-if="!currentRow.isTopTabs">
                            <div style="flex: 1;" >
                                <onSiteInspectionCheckInIndex  ref="onSiteInspectionCheckInMociRef" @completeRegistrationChange="completeRegistrationChange('末次会议')"/>
                            </div>
                            <!-- firstMeetingActiveValue == 1 -->
                            <div style="margin-left: 10px;" >
                                <canvas :key="canvasKey" :id="schyCanvasId" width="150px" height="150px"></canvas>
                                <canvas v-show="false" :key="canvasKey" :id="schyCanvasId2" width="300px" height="300px"></canvas>
                                <div style="text-align: center;">
                                    <a-button class="blue-btn" type="primary" @click="schydownloadQRCode(queryResultsImgUrl)">下载二维码</a-button>
                                    <!-- <a-button style="margin-left: 10px;" class="blue-btn" type="primary" @click="schylinkClick()">在线链接</a-button> -->
                                    <!-- <a-button
                                        style="margin-left: 10px;"
                                        class="blue-btn"
                                        type="primary"
                                        id="copy-code-button"
                                        @click="schycopyLink()">复制链接</a-button> -->
                                </div>
                            </div>
                        </div>
                        <div style="margin-bottom: 10px;" ></div>
                        <div style="display: flex;border:1px solid #38f;" >
                            <div :style="{height: currentRow.leftMlHeigth?'calc(100vh - '+(currentRow.leftMlHeigth+56)+'px)':(lastMeetingDisplay?'calc(100vh - 485px)':'calc(100vh - 278px)'),overflowY: 'auto'}">
                                <table border bordercolor="#d9d9d9" >
                                    <tr style="background: #dee5ed !important;">
                                        <th style="width: 400px;">审评组材料目录</th>
                                    </tr>
                                    <tr v-for="(item,index) in materialSummaryList" :key="index" v-if="item.clmc.indexOf('康洁自律反馈表') == -1">
                                        <td style="text-align: center;">
                                            <div style="display: flex;align-items: center;margin-bottom: 10px">
                                                <span style="color: #ed5565;font-size: 20px;"
                                                v-if="item.clmc == '无利益冲突声明' || item.clmc == '技术审评纪律' || item.clmc == '技术审评会议签到表' || item.clmc == '技术审评审评员承诺书'"
                                                >*</span>
                                                <span style="font-size: 16px;font-weight: 600;">{{ item.clmc }}</span>
                                            </div>
                                            <div style="display: flex;flex-wrap: wrap;justify-content: flex-start;align-items: center;" v-if="item.clmc !== '客户满意度调查表'">
                                                <a-button
                                                    v-if="item.clmc == '技术审评会议签到表'"
                                                    class="green-l-btn" 
                                                    style="margin:3px 0;margin-right: 5px;"
                                                    type="primary" @click="generateFilesClick(item.clmc)" icon="download"
                                                >生成签到表</a-button>

                                                <a-button
                                                    class="green-l2-btn" 
                                                    style="margin:3px 0;margin-right: 5px;"
                                                    type="primary" @click="selectFileCahnge(item.clmc)" icon="download"
                                                >下载模板</a-button>

                                                <a-button
                                                    v-if="item.clmc == '技术审评会议签到表' || item.clmc == '技术审评纪律'"
                                                    class="green-btn" 
                                                    style="margin:3px 0;margin-right: 5px;"
                                                    type="primary" @click="signatureFormCahnge(item.clmc)" icon="download"
                                                >下载签字模板</a-button>
                                                
                                                <a-upload style="display: inline-block;" :beforeUpload="$event=>{return false}" :showUploadList="false" action="" @change="singleUploadCahnge($event,item.clmc)">
                                                    <a-button
                                                    class="blue-btn" 
                                                    type="primary" icon="upload">上传</a-button>
                                                </a-upload>
                                            </div>
                                            
                                            <div class="file-for-box "  style="display: flex;flex-direction: column;">
                                                <div v-for="(trem,tIndex) in item.wjList" class="toolbox-fileList-box"
                                                    style="display: flex;align-items: center;flex-direction: row;height: auto;justify-content: flex-start"
                                                    @click="selectLastMeetingFile({...item,...trem,index,tIndex})"
                                                    :class="currentLastMeetingData.id == trem.id?'select-last-meeting-box':''"
                                                >
                                                    
                                                    <div class="toolbox-file-coontern" style="margin-right: 5px;">
                                                        <span class="toolbox-file-name" style="-webkit-line-clamp: 1;"><a href="#">{{ trem.fwjxsmc+trem.fwjlx }}</a></span>
                                                    </div>
                                                    <div class="fileList-icon-btn" style="flex: none;">
                                                        <a-icon type="download" class="toolbox-download-icon-type" style="display: inline-block;margin-right: 5px;font-size:16px;" @click.top.prevent="downloadFiles(trem)"/>
                                                        <!-- <a-icon type="eye" class="toolbox-eye-icon-type" style="padding: 0;margin: 0;margin-right: 5px;" @click.top.prevent="viewClick(trem)" v-if="trem.type == '.pdf'"/> -->
                                                        <a-icon type="delete" class="toolbox-delete-icon-type" style="display: inline-block;margin-right: 5px;" @click.top.prevent="producerDelete({...item,...trem,index,tIndex})"/>
                                                    </div>
                                                </div>
                                            </div>
                                        </td>
                                    </tr>
                                </table>
                            </div>
                            <div style="flex: 1;margin-left: 10px;border: 1px solid #d9d9d9;"  :style="{height: currentRow.rightFielHeigth?'calc(100vh - '+(currentRow.rightFielHeigth+56)+'px)':(lastMeetingDisplay?'calc(100vh - 485px)':'calc(100vh - 278px)'),overflowY: 'auto'}">
                                <a-button class="blue-btn" style="margin: 10px;"ype="primary" icon="download" @click="downloadFiles(currentLastMeetingData)">下载</a-button>
                                <a-spin tip="正在加载中..." :spinning="lastMeetingSpinning">
                                    <iframe :src="lastMeetingIframeSrc" width="100%" :height="(windowInnerHeight - (currentRow.leftMlHeigth?currentRow.leftMlHeigth+100:lastMeetingDisplay?547:340))+'px'"  v-if="lastMeetingIframeSrc"></iframe>
                                    <div v-else>
                                        <a-empty description="暂无文件或文件发生错误！"/>
                                    </div>
                                </a-spin>
                            </div>
                        </div>
                    </div>


                    <!-- <div v-show="activeKey == '审评方案拟定'" >
                        <planProductionProduction ref='planProductionProductionRef' :key="planProductionProductionKey"/>
                    </div> -->
                    <!-- activeKey == '技术审评材料汇总' -->
                    <div v-show="false">
                        <div style="text-align: right;padding: 5px;">
                        </div>
                        <table border bordercolor="#d9d9d9" style="width: 100%; ">
                            <tr>
                                <th style="width: 160px;">材料目录</th>
                                <th>文件</th>
                                <th style="width: 220px;">
                                    操作
                                    
                                </th>
                            </tr>
                            <tr v-for="(item,index) in materialSummaryList" :key="index">
                                <td style="text-align: center;">
                                    <div style="display: flex;align-items: center;">
                                        <span style="color: #ed5565;font-size: 20px;"
                                        v-if="item.clmc == '无利益冲突声明' || item.clmc == '技术审评纪律' || item.clmc == '技术审评会议签到表' || item.clmc == '技术审评审评员承诺书'"
                                        >*</span>
                                        <span>{{ item.clmc }}</span>
                                    </div>
                                </td>
                                <td>
                                    <div class="file-for-box">
                                        <div style="display: flex;flex-wrap: wrap;">
                                            <div v-for="(trem,tIndex) in item.wjList" class="toolbox-fileList-box"
                                            style="display: flex;align-items: center;flex-direction: row;height: auto;">
                                                
                                                <div class="toolbox-file-coontern" style="margin-right: 5px;flex: 1;">
                                                    <a-tooltip placement="rightBottom">
                                                        <template slot="title">
                                                        <span>{{ trem.fwjxsmc+trem.fwjlx }}</span>
                                                        </template>
                                                        <span class="toolbox-file-name" style="-webkit-line-clamp: 1;"><a href="#">{{ trem.fwjxsmc+trem.fwjlx }}</a></span>
                                                    </a-tooltip>
                                                    
                                                </div>
                                                <div class="fileList-icon-btn" style="flex: none;">
                                                    <a-icon type="download" class="toolbox-download-icon-type" style="display: inline-block;margin-right: 5px;font-size:16px;" @click="downloadFiles(trem)"/>
                                                    <a-icon type="eye" class="toolbox-eye-icon-type" style="padding: 0;margin: 0;margin-right: 5px;" @click="viewClick(trem)" v-if="trem.type == '.pdf'"/>
                                                    <a-icon type="delete" class="toolbox-delete-icon-type" style="display: inline-block;margin-right: 5px;" @click="producerDelete(trem)"/>
                                                </div>
                                            </div>
                                        </div>
                                        <!-- <div class="file-for-v" v-for="(trem,tIndex) in item.wjList" :key="tIndex">
                                            <div class="file-icon-box">
                                                <div class="right-box">
                                                    //<a-icon class="fileicon-v" type="form" @click="editClick(trem)" />
                                                    <a-icon class="fileicon-v deleteicon-v" type="delete" @click="producerDelete(trem)"/>
                                                </div>
                                                <a-icon class="file-icon-v" type="file-pdf" />
                                                <div class="right-box">
                                                    //<a-upload style="display: inline-block;" :beforeUpload="$event=>{return false}" :showUploadList="false" action="" @change="producerUpload($event,trem)">
                                                        <a-icon class="fileicon-v" type="upload" />
                                                    </a-upload>
                                                    //
                                                    <a-icon class="fileicon-v" type="eye" @click="viewClick(trem)" v-if="trem.fwjlx == '.pdf'" />
                                                    <a-icon class="fileicon-v" type="download" @click="downloadFiles(trem)"/>
                                                </div>
                                            </div>
                                            <a @click="downloadFiles(trem)" class="name-fclmc-text">{{ trem.fwjxsmc+trem.fwjlx }}</a>
                                        </div> -->
                                    </div>
                                </td>
                                <td v-if="item.clmc !== '客户满意度调查表'">
                                    <!-- <a-button
                                    class="blue-btn" 
                                    style="margin:3px 0;margin-right: 5px;"
                                    type="primary" @click="initWjjlServe(item.clmc)">生成记录</a-button> -->

                                    <a-button
                                    class="green-l2-btn" 
                                    style="margin:3px 0;margin-right: 5px;width: 124px;"
                                    type="primary" @click="selectFileCahnge(item.clmc)" icon="download">下载模板</a-button>

                                    <!-- <a-button
                                    style="margin:3px 0;margin-right: 5px;"
                                    class="blue-btn" 
                                    type="primary" @click="batchUploadCahnge(item.clmc)">批量上传</a-button> -->
                                    <a-upload style="display: inline-block;" :beforeUpload="$event=>{return false}" :showUploadList="false" action="" @change="singleUploadCahnge($event,item.clmc)">
                                        <a-button
                                        class="blue-btn" 
                                        style="width: 124px;"
                                        type="primary" icon="upload">上传</a-button>
                                    </a-upload>

                                    <!-- <a-button
                                    style="margin:3px 0;margin-right: 5px;"
                                    class="blue-btn" 
                                    type="primary" @click="downloadTemplateCahnge(item.clmc)">下载模板</a-button> -->
                                    
                                </td>
                                <td v-else>

                                </td>
                            </tr>
                        </table>
                        <div style="width: 100%;display: flex;justify-content: flex-end;margin-top: 15px;" v-if="!currentRow.isTopTabs">
                            <a-button class="blue-btn" type="primary" @click="submitOnSite('spcysubmitFlow')" >提交技术审评任务</a-button>
                        </div>
                    </div>
                    <div v-show="activeKey == '材料审查'">
                        <materialReviewExamination ref="materialReviewExaminationRef" :key="materialReviewExaminationKey" />
                    </div>
                    <div v-show="activeKey == '申请信息'  || activeKey == '环节流转记录'" style="height: 100%;overflow: hidden;">
                        <a-spin size="large" :spinning="modalSpinningPrice" tip="正在加载中...">
                            <eventSet :key="eventSetKey" ref="eventSetRef" @updatedSuccess="eventupdatedSuccess"/>
                        </a-spin>
                    </div>
                </div>
            </div>
            <div class="sceneInspect-right-zlckBox" v-if="currentSteps == 2 && dataViewingStatus">
                <div class="left-bgBox-top" style="display: flex;align-items: center;" @click="dataViewingStatus = !dataViewingStatus">
                    <a-icon type="double-left" />
                    <span class="title" style="text-align:right;">资料查看</span>
                </div>
                <div style="padding: 5px;">
                    <a-spin tip="正在加载中..." :spinning="zlmlSpinning">
                        <iframe :src="zlmlIframeSrc" width="100%" :height="(windowInnerHeight - 260)+'px'"  v-if="zlmlIframeSrc"></iframe>
                        <div v-else>
                            <a-empty description="暂无文件或文件发生错误！"/>
                        </div>
                    </a-spin>
                </div>
            </div>
        </div>
        <!-- 审评方案拟定 -->
        <!-- v-if="currentSteps == 1 || currentSteps == 2 || currentSteps == 3" -->
        
        <a-modal
            v-model:visible="planMaterialsvisible"
            title="审评方案材料"
            @ok="planMaterialsvisible = false"
            width="100%"
            wrapClassName="plan-materials-full-modal"
            :footer=null
        >
            <planProductionProduction ref='planProductionProductionRef' :key="planProductionProductionKey"/>
        </a-modal>
        <a-modal v-model="changeFileNamevisible" title="修改笔记文件名称" @ok="changeFileNameHandleOk">
            <a-textarea 
                placeholder="请输入笔记文件名称"
                v-model:value="changeFileNameVal"
                :autosize="{ minRows: 1, maxRows: 3 }"
            ></a-textarea>
        </a-modal>
        <selectTemplateDownload ref="selectTemplateDownloadRef" />
        <selectTemplate ref="selectTemplateRef" @selectTemplateComplete="selectTemplateCompleteNoModel"/>
        <serverEditingView ref="serverEditingViewRef" @refreshChange="$event=>{}"/>
        <serverEditing ref="serverEditingRef" @refreshChange="refreshChange"/>
        <QRQueryResults ref="QRQueryResultsRef"/>
        <chooseTerms ref="chooseTermsRef" @chooseTermsSuccess="chooseTermsSuccess" />
        <recitingDiscipline ref="recitingDisciplineRef" />
    </div>
</template>
<script>
import chooseTerms from './chooseTerms.vue'
import selectTemplateDownload from '@/components/selectTemplate/selectTemplate-download.vue'
import serverEditing from '@/components/comp-model-series/server-editing.vue'
import serverEditingView from '@/components/comp-model-series/server-editing-view'
import selectTemplate from '@/components/selectTemplate/selectTemplate.vue'
import onSiteInspectionCheckInIndex from '../../../../onSiteInspectionCheck-In/index.vue'
import recitingDiscipline from './recitingDiscipline.vue'
import { 
    spcygetJcqkzgMb,
    spcysaveFlow,
    spcysaveJbxx,
    spcyaddJcqkzsMb,
    spcydeleteJcyj,
    spcyqueryXcjczjByNowUser,
    flfgverifyXcjczjWc,
    flfgxcjczjplwc,
    spcyupdatwXcjczj,
    spcygetXcjczjMsmbList,
    spcyselectHistoryMsmb,
    spcyqueryListXcjcwtBySqsxId,
    spcyqueryPageXcjcHistoryTkListByXcjcZjId,
    spcyselectHistoryXcjcwt,
    spcyaddXcjcWt,
    spcyupdatwXcjcwt,
    spcyqueryPageTkListByZjId,
    spcyagainXcjcwttk,
    spcyaddXcjcwttk,
    spcydeleteXcjcwttk,
    spcygenerateXcjcConclusion,
    spcygetJcbgMb,
    spcygetQxbgMb,
    spcyaddJcbgMb,
    spcyaddQxbgMb,
    spcyqueryXcjcFileMl,
    commoninitWjjl,
    uploadPdfFileById,
    spcySqsxWjjldeleteFileById,
    spcySqsxWjjlgetLocalFileById,
    spcydownloadSqsxFileMb,
    spcyuploadSqsxFile,
    spcygetXcjcbgFile,
    spcygetXcjcqxbgFile,
    spcydeleteXcjcwt,

    getWebOfficeDownloadFile,
    webOfficeApiopenFile,
    spcySqsxWjjlmodifyWjMc,
    openFileReadOnly,
    wjmbWebOfficeApiopenFileRead,
    spcydownloadQysqclFile,
    getDocxToPdf,
    againEditPdfOnlineFile,
    getDocxToPdfAndGz,
    pdfFileHcCa,
    wjjbxxPageList,
    xcjcjdqueryDqJdmc,
    xcjcjdpreviousNode,
    xcjcjdnextNode,
    spcyqueryWjMlBySchyJc,
    spcyqueryWjMlBySchyQy,
    initWjgetXcjcblFile,
    sqsxYwxxHtmlToFileByXcjchy,
    sqsxYwxxdownHtmlToFileByXcjchy,
    sqsxYwxxdownHtmlToFileByXcjcjl,
    spcydownZipZxclQy,
    sqsxYwxxquerySchyQdjlFj,
    spcyqueryWjmlByXcjcbl,
    flfgxcjczjwc,
    flfgxcjczjcxbj,
    flfgqueryWttkList,
    sqsxYwxxquerySqsxHyPageList,
    mbzjqueryHbjcBgMl,
    hbjcgetSxInfo,
    mbzjqueryjcbgMbList,
    spcyqueryKckWjclList,
    queryHcyXpList,
    spcygetJcfaFile,
    
} from './service/index'
 import YchConstant from "@/api/YchConstant";
 import blobType from '@/common/blobType'
 import eventSet from '../taskAcceptance/eventSet.vue'
import { now } from 'xe-utils';
import handlingOpinionsDescribe from '@/components/handling-opinions/handling-opinions-describe.vue'
import assessCheckApi from './service/api'
import moment from 'moment'
import compSelector from '@/components/compSelector/compSelector'
import commpVxeTable from '@/components/commp-vxe-table/commp-vxe-table.vue'
import selectTemplateNoModel from '@/components/selectTemplate/selectTemplate-noModel.vue'
import materialReviewExamination from '../materialReview/examination.vue'
import planProductionProduction from '../planProduction/production.vue'
import {qrcanvas} from 'qrcanvas'
import QRQueryResults from './QRQueryResults.vue'
import store from '@/store'
import { degrees, PDFDocument, rgb, StandardFonts } from 'pdf-lib'
export default {
    components:{
        eventSet,
        handlingOpinionsDescribe,
        compSelector,
        commpVxeTable,
        selectTemplateDownload,
        serverEditing,
        serverEditingView,
        selectTemplateNoModel,
        selectTemplate,
        materialReviewExamination,
        onSiteInspectionCheckInIndex,
        planProductionProduction,
        QRQueryResults,
        chooseTerms,
        recitingDiscipline,
    },
    props:{

    },
    data(){
        return{
            modalSpinningPrice:true,
            activeKey:'',
            currentRow:{},
            eventSetKey:null,
            allStatusKey:null,
            onSiteInspectionKey:null,
            //描述模板
            inputSearchKey:null,
            drawerVisible:false,
            drawerKey:null,
            describeLoading:false,
            describeTemp:{},
            paginationDescribe:{
                pageNo:1,
                pageSize:10,
            },
            totalDescribe:0,
            describeList:[],
            fmbnrSearch:'',
            fmbly:'个人',
            paginationKey:null,

            //审评总体情况
            overallNum:{
                hjSize:0,
                wcSize:0,
                wwcSize:0,
            },
            overallKey:null,
            chapterList:[],
            chapterRow:{
                index:0,
            },
            chapterActiveKey:'情况描述',
            situationDescriptionVisible:false,
            chapterdrawerKey:null,
            chapterRadio:'我写过的描述',
            searchSituationText:'',
            situationList:[],
            situationLoading:false,
            chapterIssuesList:[],
            chapterIssuesSpinning:false,
            problemHistoryList:[],
            problemHistoryVisible:false,
            problemHistoryLoading:false,
            searchProblemHistoryText:'',
            problemHistoryKey:null,
            currentTerms:{item:{},trem:{}},

            termItemVisible:false,
            termItemKey:null,
            termItemList:[],
            termItemLoading:false,
            searchTermItemText:'',
            reportName:'',

            reportTemplateVisible:false,
            reportTemplateKey:null,
            reportTemplateList:[],
            reportTemplateLoading:false,
            reportTemplateSearchText:'',
            reportTemplatefmbly:'个人',
            programData:{},
            defectReportData:{},
            iframeKey:null,

            //技术审评材料汇总
            materialSummaryList:[],
            chapterIssuesKey:null,
            programDataiframeSrc:'',
            defectReportDataiframeSrc:'',
            xcjcbjData:{},
            xcjcbjiframeSrc:'',
            programKey:null,
            defectReportKey:null,
            windowInnerHeight:window.innerHeight,
            materialReviewExaminationKey:null,
            planProductionProductionKey:null,
            questionnaireId:'',
            currentSteps:0,
            stepsArr:['首次会议','技术审评笔记','审评报告制作','末次会议'],
            firstMeetingInspectionTeamList:[],
            firstMeetingEnterpriseList:[],
            planMaterialsvisible:false,
            canvasKey:null,
            canvasId:'signedVersion'+ new Date().getTime(),
            queryResultsQr:null,
            firstMeetingAndAttachmentData:[],
            autographUrl:'',
            firstMeetingActiveValue:0,
            firstMeetingDataKey:null,
            firstMeetingTableKey:null,
            firstMeetingTableConfig:{
                api:'',
                rowId: 'id',
                height:window.innerHeight - 413,
                autoHidden:true,
                pageSize:100,
                paramet:{
                }
            },
            firstMeetingTableConfig1:{
                api:'',
                rowId: 'id',
                height:window.innerHeight - 413,
                autoHidden:true,
                pageSize:100,
                paramet:{
                }
            },
            firstMeetingTableDataList:[],
            firstMeetingAdaptiveHeight:false,
            firstMeetingMaterialList:[],
            firstMeetingMaterialKey:null,
            currentFirstMeetingData:{},
            firstMeetingTableColumnsVxe:[{
                title: '人员类型', //列头显示文字
                field: 'frylx',
                slots: {
                    default:'frylx_default',
                },
            },{
                title: '签到时间', //列头显示文字
                field: 'fhyqdrq',
                // width: 176
                // width: 150
            },{
                title: '人员签名', //列头显示文字
                field: 'fuserid',
                slots: {
                    default:'fuserid_default',
                },
                // width: 110
            }],
            firstMeetingTableColumnsVxe1:[{
                title: '人员类型', //列头显示文字
                field: 'frylx',
                slots: {
                    default:'frylx_default',
                },
            },{
                title: '部门职务', //列头显示文字
                field: 'fbm',
            },{
                title: '签到时间', //列头显示文字
                field: 'fhyqdrq',
                width: 176
            },{
                title: '人员签名', //列头显示文字
                field: 'fuserid',
                slots: {
                    default:'fuserid_default',
                },
                width: 110
            }],
            firstMeetingTableColumnsVxe2:[{
                title: '人员类型', //列头显示文字
                field: 'frylx',
                slots: {
                    default:'frylx_default',
                },
            },{
                title: '勾选项内容', //列头显示文字
                field: 'wlyczlygx',
                slots: {
                    default:'gxnr_default',
                },
            },{
                title: '可能存在的利益冲突关系', //列头显示文字
                field: 'wlyczlygx',
            },{
                title: '签到时间', //列头显示文字
                field: 'fhyqdrq',
                width: 176
            },{
                title: '声明人签名', //列头显示文字
                field: 'fuserid',
                slots: {
                    default:'fuserid_default',
                },
                width: 110
            }],
            firstMeetingTableColumnsVxe3:[{
                title: '人员类型', //列头显示文字
                field: 'frylx',
                slots: {
                    default:'frylx_default',
                },
            },{
                title: '签到时间', //列头显示文字
                field: 'fhyqdrq',
                // width: 150
            },{
                title: '承诺人签名', //列头显示文字
                field: 'fuserid',
                slots: {
                    default:'fuserid_default',
                },
                // width: 110
            }],
            firstMeetingMaterialColumnsVxe:[{
                title: '审评组材料目录', //列头显示文字
                field: 'clmc',
            },{
                title: '操作', //列头显示文字
                field: 'options',
                slots: {
                    default:'options_default',
                },
                width: 280
            }],
            firstMeetingMaterialColumnsVxe1:[{
                title: '审评组材料目录', //列头显示文字
                field: 'clmc',
                slots: {
                    default:'clmc_default',
                },
            },{
                title: '文件', //列头显示文字
                field: 'wjList',
                slots: {
                    default:'wjList_default',
                },
            },{
                title: '操作', //列头显示文字
                field: 'options',
                slots: {
                    default:'options_default',
                },
                width: 280
            }],
            xcjcNoteData:{},
            xcjcNoteIframeSrc:'',
            cjcNoteSpinning:false,
            currentXcjcNoteState:{},
            currentLastMeetingData:{},
            lastMeetingSpinning:false,
            lastMeetingIframeSrc:'',
            problemTableKey:null,
            problemTableConfig:{
                api:'',
                rowId: 'id',
                height:window.innerHeight - 413,
                autoHidden:true,
                pageSize:100,
                paramet:{
                }
            },
            problemTableColumnsVxe:[{
                title: '序号',
                field: 'forder',
                slots: {
                    default:'forder_default',
                },
                width: 70
            },{
                title: '缺陷类型',
                field: 'fyzcd',
                slots: {
                    default:'fyzcd_default',
                },
                width: 180
            },{
                title: '缺陷描述',
                field: 'fwtms',
                slots: {
                    default:'fwtms_default',
                },
            },],
            problemTableList:[],
            lastMeetingDisplay:true,
            schyCanvasId:'schyCanvasId'+ new Date().getTime(),
            schyCanvasId2:'schyCanvasId2'+ new Date().getTime(),
            newImage:new Image(),
            queryResultsQr:null,
            queryResultsImgUrl:'',
            firstMeetingRow:{},
            reportList:[],
            reportStatus:true,
            dataViewingStatus:true,
            dataViewingTabKey:'技术审评笔记',
            selectReportItem:{},
            reportTabKey:null,
            reportValKey:null,
            zlmlSpinning:false,
            zlmlIframeSrc:'',
            currentXcjcMLNoteState:{},
            noticeMaterialDataList:[],
            noticeMaterialData:[
            // {
            //     name:'审评方案',
            //     fileType:'审评方案',
            //     listType:'jcfaList',
            //     fileList:[],
            // },
            {
                name:'审评员函',
                fileType:'选派专家的函',
                listType:'xpxccydhList',
                fileList:[],
            },{
                name:'观察员函',
                fileType:'选派现场观察员的函',
                listType:'xpxcgcydhList',
                fileList:[],
            },{
                name:'企业通知函',
                fileType:'企业单位审评通知',
                listType:'qydwjctzList',
                fileList:[],
            },{
                name:'审评整改材料要求',
                fileType:'审评整改材料要求',
                listType:'jczgclyqList',
                fileList:[],
            },{
                name:'企业申报材料',
                fileType:'企业申报材料',
                listType:'qysbclList',
                fileList:[],
            },{
                name:'审评报告模板',
                fileType:'技术审评报告',
                listType:'jcbgmbList',
                fileList:[],
            }],
            realname:store.getters.userInfo.realname,//获取用户名
            changeFileNameVal:'',
            changeFileNamevisible:false,
        }
    },
    watch:{

    },
    mounted(){
        
    },
    methods:{
        async getData(row){
            this.currentRow = row
            if(this.currentRow.fhbsxzt == 1){
                this.getReportData()
            }else{
                this.selectReportItem.sqsxid = row.sqsxid
                this.getOverallSituation(this.currentRow)
                
                this.defectReportChange(this.currentRow)
                this.xcjcbjChange(this.currentRow)
                this.selectReportItem.fjcqkzs = this.currentRow.fjcqkzs
                this.selectReportItem.fcyjl = this.currentRow.fcyjl
                this.selectReportItem.fcyqtwt = this.currentRow.fcyqtwt
                this.selectReportItem.fjcqxxm = this.currentRow.fjcqxxm
            }
            this.autographUrl = bootConfig[process.env.NODE_ENV].locality_ApI + YchConstant.SPZX_SPCY +'/zdyFile/downFile?id='
            await xcjcjdqueryDqJdmc({sqsxid:row.sqsxid}).then(res=>{
                if(res.code == 200){
                    //console.log('获取到什么节点',res)
                    this.currentSteps = this.stepsArr.indexOf(res.result)<0?0:this.stepsArr.indexOf(res.result)
                    if(this.currentSteps == 3){
                        this.getERWMData()
                    }
                    this.getxcjcbgData()
                }else{
                    this.currentSteps = 0
                }
            })
            //isZZState 是否是组长
            //isRwfpFlag 是否选择负责人
            //console.log('我是技术审评',row)
            
            if(!row.noFirstLoad){
                // this.activeKey = !this.currentRow.isZZState?'审评总体情况':(row.isActiveKey?row.isActiveKey:'审评情况专述')
                // this.activeKey = row.isActiveKey?row.isActiveKey:'会议签到'审评情况专述
                this.activeKey = row.isActiveKey?row.isActiveKey:'审评情况专述'
            }
            
            this.$nextTick(()=>{
                this.$refs.materialReviewExaminationRef.getData({sqsxid:row.sqsxid,isTopTabs:true,isActiveKey:'材料审查',isDisabled:true,fhjmc:row.fhjmc,reserveBottom:35,rightPreviewBoxH:window.innerHeight - 210})
            })
            this.$nextTick(()=>{
                setTimeout(() => {
                    if(this.currentSteps == 0){
                        this.$refs.onSiteInspectionCheckInIndexRef.getData({sqsxid:this.currentRow.sqsxid,fhylx:'首次会议'})
                    }else if(this.currentSteps == 3){
                        this.$refs.onSiteInspectionCheckInMociRef.getData({sqsxid:this.currentRow.sqsxid,fhylx:'末次会议'})
                    }
                    
                }, 200);
            })
            //查询问卷调查id
            wjjbxxPageList().then(res=>{
                //console.log('查询问卷调查id',res.result.records)
            })
            this.getFirstMeetingData()
            this.getNoteData()
            this.getHYData()
            this.getPreparationOfInspectionPlan(['审评方案','通知材料','企业申报材料','审评报告模板'])
            
        },
        getxcjcbgData(){
            if( this.currentSteps == 2){
                this.programMemakeChange(this.selectReportItem)
                this.defectReportChange(this.selectReportItem)
            }else{
                
                this.getMaterialSummary()
            }
        },
        getERWMData(){
            this.queryResultsQr = qrcanvas({
                data: bootConfig[process.env.NODE_ENV].EXTERNAL_ACCESS_URL2+process.env.BASE_URL+`businessManagementSatisfactionSurvey?obj=`+JSON.stringify({sqsxid:this.currentRow.sqsxid})|| "二维码生成中",
                size:260,
                background:'#fff'
            })
            this.queryResultsImgUrl = this.newImage.src = this.queryResultsQr.toDataURL("image/png")
            this.$nextTick(()=>{
                setTimeout(()=>{
                    var canvas = document.getElementById(this.schyCanvasId);
                    var context = canvas.getContext('2d');
                    context.font = "16px Arial"
                    context.textAlign = "center"
                    // context.globalCompositeOperation = 'source-in';
                    context.fillStyle = "#000";
                    context.background = '#fff'
                    context.fillText('满意度调查',80,15);
                    var img = new Image();
                    img.onload = function() {
                        context.drawImage(img, 20, 20,125,125);
                    }
                    img.src = this.queryResultsQr.toDataURL("image/png");
                    var canvas2 = document.getElementById(this.schyCanvasId2);
                    var context2 = canvas2.getContext('2d');
                    context2.font = "22px Arial"
                    context2.textAlign = "center"
                    // context.globalCompositeOperation = 'source-in';
                    context2.fillStyle = "#000";
                    context2.background = '#fff'
                    context2.fillText('满意度调查',150,22);
                    var img2 = new Image();
                    img2.onload = function() {
                        context2.drawImage(img, 20, 40,260,260);
                    }
                    img2.src = this.queryResultsQr.toDataURL("image/png");
                },200)
            })
        },
        //=============审评方案拟定========================
        async getPreparationOfInspectionPlan(val,csh){
            this.noticeMaterialDataList = []
            let arr = []
            if(val.indexOf('审评方案') !== -1){
                //审评方案
                
                await spcygetJcfaFile({sqsxid:this.currentRow.sqsxid}).then(res=>{
                    this.noticeMaterialDataList.push({
                        name:'审评方案',
                        fileType:'审评方案',
                        listType:'jcfaList',
                        fileList:[]
                    })
                    if(res.code == 200){
                        
                        if(this.currentRow.fhbsxzt == 1){
                            if(res.result.length){
                                this.noticeMaterialDataList.push(...res.result)
                            }
                        }else{
                            this.noticeMaterialDataList.push(res.result.length?res.result[0]:{})
                        }
                        
                    }
                })
            }
            if(val.indexOf('通知材料') !== -1){
                await queryHcyXpList({sqsxid:this.currentRow.sqsxid}).then(res=>{
                    if(res.code == 200){
                        //console.log('通知材料制作',res.result)
                        let data = res.result
                        for(let key in data){
                            this.noticeMaterialData.forEach((item,index)=>{
                                if(item.listType == key){
                                    this.noticeMaterialDataList.push(item,...data[key])
                                }
                            })
                        }
                        this.noticeMaterialKey = Date.now()
                    }else{
                        // this.$message.warning(res.message)
                    }
                    
                })
            }
            if(val.indexOf('企业申报材料') !== -1){
                await spcyqueryKckWjclList({sqsxid:this.currentRow.sqsxid}).then(res=>{
                    this.noticeMaterialDataList.push({
                        name:'企业申报材料',
                        fileType:'企业申报材料',
                        listType:'qysbclList',
                        fileList:[],
                    })
                    if(res.code == 200){
                        let data = []
                        data = res.result.map((a,i)=>{return {...a,currentType:'企业申报材料'}})
                        this.noticeMaterialDataList.push(...data)
                    }else{
                    }
                })
            }
            if(val.indexOf('审评报告模板') !== -1){
                await mbzjqueryjcbgMbList({sqsxid:this.currentRow.sqsxid}).then(res=>{
                    this.noticeMaterialDataList.push({
                        name:'审评报告模板',
                        fileType:'技术审评报告',
                        listType:'jcbgmbList',
                        fileList:[],
                    })
                    if(res.code == 200){
                        let data = []
                        data = res.result.map((a,i)=>{return {...a,currentType:'审评报告模板'}})
                        this.noticeMaterialDataList.push(...data)
                    }else{
                    }
                })
            }
            if(!(this.xcjcNoteData.wjList && this.xcjcNoteData.wjList.length)){
                let num = ''
                this.noticeMaterialDataList.forEach((item,index)=>{
                    if((item.fwjxsmc || item.fclmc) && !num){
                        this.selectmlNoteItem(item)
                        num = 1
                    }
                })
            }
        },
        // 
        getReportData(){
            mbzjqueryHbjcBgMl({sqsxid:this.currentRow.sqsxid}).then(res=>{
                if(res.code == 200){
                    //console.log('多事项报告模板',res.result.records)
                    if(res.result.records && res.result.records.length){
                        this.reportList = res.result.records
                        this.selectReportChange(this.reportList[0],0)
                    }else{
                        this.selectReportItem = {sqsxid:this.currentRow.sqsxid,}
                        this.selectReportChange(this.currentRow,0)
                    }
                }else{
                    this.selectReportItem = {sqsxid:this.currentRow.sqsxid}
                    this.selectReportChange(this.currentRow,0)
                }
            })
        },
        getReportDetails(){
            hbjcgetSxInfo({sqsxid:this.selectReportItem.sqsxid}).then(res=>{
                if(res.code == 200){
                    //console.log('我获取的申请事项合并详情',res.result)
                    this.selectReportItem.fjcqkzs = res.result.fjcqkzs
                    this.selectReportItem.fcyjl = res.result.fcyjl
                    this.selectReportItem.fcyqtwt = res.result.fcyqtwt
                    this.selectReportItem.fjcqxxm = res.result.fjcqxxm
                }else{
                    this.selectReportItem.fjcqkzs = this.currentRow.fjcqkzs
                    this.selectReportItem.fcyjl = this.currentRow.fcyjl
                    this.selectReportItem.fcyqtwt = this.currentRow.fcyqtwt
                    this.selectReportItem.fjcqxxm = this.currentRow.fjcqxxm
                }
                this.reportValKey = Date.now()
            })
        },
        selectReportChange(item,index){
            this.selectReportItem = {sqsxid:item.sqsxid,bgmc:item.bgmc?item.bgmc:''}
            this.getDescribeData(this.paginationDescribe,this.fmbnrSearch,this.fmbly)
            this.getOverallSituation(this.selectReportItem)
            this.getxcjcbgData()
            this.defectReportChange(this.selectReportItem)
            this.xcjcbjChange(this.selectReportItem)
            this.getReportDetails()
            this.activeKey = '审评情况专述'

            setTimeout(()=>{
                this.reportTabKey = Date.now()
            },200)
        },
        selectReportClick(item,index){//选中报告
            this.selectReportChange(item,index)
        },
        clickEvent3(){
            const $pulldown = this.$refs.pulldownRef
            if ($pulldown) {
                $pulldown.togglePanel()
                // hidePanel
            }
        },
        //右边区域页签
        dataViewingPaneChange(){

        },
        getHYData(){
            // fhyzt:,id:row.id,frylx:'企业',fhylx:'首次会议',sqsxid:this.currentRow.sqsxid
            sqsxYwxxquerySqsxHyPageList({fhylx:'首次会议',sqsxid:this.currentRow.sqsxid}).then(res=>{
                if(res.code == 200){
                    this.firstMeetingRow = res.result.records && res.result.records.length ?res.result.records[0]:{}
                }else{
                    this.firstMeetingRow = {}
                }
            })
        },
        completeRegistrationChange(val){//会议完成点击触发的方法
            if(val == '首次会议'){
                this.getFirstMeetingData(this.firstMeetingActiveValue)
                
            }else{
                this.getMaterialSummary()
            }
            this.getHYData()
        },
        //获取首次人员和表的情况
        getFirstMeetingData(val){
            val = val?val:0
            this.firstMeetingTableColumnsVxe = []
            this.firstMeetingTableDataList = []
            sqsxYwxxquerySchyQdjlFj({sqsxid:this.currentRow.sqsxid}).then(res=>{
                if(res.code == 200){
                    //console.log('获取首次人员和表的情况',res)
                    
                    this.firstMeetingAndAttachmentData = res.result
                    this.firstMeetingActiveValue = val
                    this.currentFirstMeetingData = res.result && res.result.length?res.result[val]:{}
                    this.firstMeetingTableColumnsVxe = this.currentFirstMeetingData.clmc == '技术审评会议签到表'?this.firstMeetingTableColumnsVxe1:(this.currentFirstMeetingData.clmc == '无利益冲突声明'?this.firstMeetingTableColumnsVxe2:this.firstMeetingTableColumnsVxe3)
                    this.firstMeetingAdaptiveHeight = this.currentFirstMeetingData.clmc == '技术审评会议签到表'?true:false
                    this.firstMeetingTableConfig1.height = this.currentFirstMeetingData.clmc == '技术审评会议签到表'?135:window.innerHeight - 413

                    this.firstMeetingTableDataList = res.result && res.result.length?res.result[val].qdList:true
                    this.firstMeetingMaterialList = res.result && res.result.length?(this.currentFirstMeetingData.clmc == '技术审评审评员承诺书' || this.currentFirstMeetingData.clmc == '无利益冲突声明'?(res.result[val].wjList && res.result[val].wjList.length?res.result[val].wjList:true):[res.result[val]]):true
                    this.firstMeetingDataKey = Date.now()
                    this.firstMeetingMaterialKey = Date.now()
                    this.firstMeetingTableKey  = Date.now()
                }else{
                    this.firstMeetingAndAttachmentData = []
                }
            })
        },
        firstMeetingTabChange(val){
            //console.log(val)
            this.getFirstMeetingData(val)
        },
        schylinkClick(){
            var link = document.createElement('a');
            link.target='_blank'
            link.href = bootConfig[process.env.NODE_ENV].EXTERNAL_ACCESS_URL2+process.env.BASE_URL+`businessManagementSatisfactionSurvey?obj=`+JSON.stringify({sqsxid:this.currentRow.sqsxid})|| "二维码生成中",
            link.click();
        },
        schydownloadQRCode(val){
            var canvas = document.getElementById(this.schyCanvasId2);
            var dataURL = canvas.toDataURL('image/png');
            // 创建一个链接元素
            var link = document.createElement('a');
            link.download = '满意度调查二维码.png'; // 设置图片名称
            link.href = dataURL; // 设置图片链接
            link.click(); // 模拟点击链接，下载图片
        },
        schycopyLink(val) {
            var link = document.createElement('a');
            link.href = bootConfig[process.env.NODE_ENV].EXTERNAL_ACCESS_URL2+process.env.BASE_URL+`businessManagementSatisfactionSurvey?obj=`+JSON.stringify({sqsxid:this.currentRow.sqsxid})|| "二维码生成中"
            const copyInput = document.createElement('input');
            copyInput.value = link.href;
            document.body.appendChild(copyInput);
            copyInput.select();
            document.execCommand('copy');
            document.body.removeChild(copyInput);
            this.$message.success('链接已复制！')
        },
        //技术审评
        getNoteData(row,type){
            spcyqueryWjmlByXcjcbl({sqsxid:this.currentRow.sqsxid}).then(res=>{
                if(res.code == 200){
                    //console.log('技术审评笔记得到什么数据',res)
                    this.xcjcNoteData = res.result && res.result.length?res.result[0]:{}
                    this.currentXcjcNoteState = this.xcjcNoteData.wjList && this.xcjcNoteData.wjList.length?this.xcjcNoteData.wjList[row?row.index:0]:{}
                    this.currentXcjcNoteState.index = row?row.index:0
                    this.selectNoteItem(this.currentXcjcNoteState)
                    this.selectmlNoteItem(this.xcjcNoteData.wjList && this.xcjcNoteData.wjList.length?this.xcjcNoteData.wjList[0]:{})
                }else{
                    this.xcjcNoteData = {}
                }
            })
        },
        selectNoteItem(item){
            this.xcjcNoteIframeSrc = ''
            this.cjcNoteSpinning = true
            if(item.id){
                this.currentXcjcNoteState = item
                this.xcjcNoteIframeSrc = ''
                this.cjcNoteSpinning = true
                if(item.fwjlx == '.doc' || item.fwjlx == '.docx'){
                    openFileReadOnly({id:item.id}).then(res=>{
                        if(res.code == 200){
                            this.xcjcNoteIframeSrc = res.result.wordUrl
                        }else{
                            this.xcjcNoteIframeSrc = ''
                        }
                    })
                    this.cjcNoteSpinning = false
                }else{
                    this.xcjcNoteIframeSrc = bootConfig[process.env.NODE_ENV].locality_ApI + YchConstant.SPZX_SPCY + '/spcyRsWjmb/openWjjl?id='+item.id
                    this.cjcNoteSpinning = false
                }
            }else{
                this.cjcNoteSpinning = false
            }
        },
        async selectmlNoteItem(item){
            this.zlmlSpinning = true
            this.currentXcjcMLNoteState = item
            if(item.id){
                if(item.currentType == '企业申报材料'){
                    const data = await spcydownloadQysqclFile({id:item.id})
                    //console.log('我获取到了什么文件流？',data)
                    const realnameDate = this.realname+moment().format('YYYY年MM月DD日')
                    //console.log('水印文本',realnameDate)
                    this.zlmlIframeSrc = ''
                    this.previewPdfConstructor({
                        blob: data,
                        docTitle: 'window.open docTitle',
                        isAddWatermark: true, // 是否需要添加水印
                        watermark: { // watermark必填 里面可以不填
                            type: 'canvas',
                            text: realnameDate
                        }
                    })
                }else{
                    if(item.currentType == '审评报告模板' && item.fwjlx == '.doc' || item.fwjlx == '.docx'){
                        wjmbWebOfficeApiopenFileRead({id:item.id}).then(res=>{
                            if(res.code == 200){
                                this.zlmlIframeSrc = res.result.wordUrl
                            }else{
                                this.zlmlIframeSrc = ''
                            }
                            this.zlmlSpinning = false
                        })
                    }else if(item.fwjlx == '.doc' || item.fwjlx == '.docx'){
                        openFileReadOnly({id:item.id}).then(res=>{
                            if(res.code == 200){
                                this.zlmlIframeSrc = res.result.wordUrl
                            }else{
                                this.zlmlIframeSrc = ''
                            }
                            this.zlmlSpinning = false
                        })
                        
                    }else{
                        this.zlmlIframeSrc = bootConfig[process.env.NODE_ENV].locality_ApI + YchConstant.SPZX_SPCY + '/spcyRsWjmb/openWjjl?id='+item.id
                        this.zlmlSpinning = false
                    }
                }
            }else{
                this.zlmlIframeSrc = ''
                this.zlmlSpinning = false
            }
            
        },
        previewPdfConstructor({ blob, docTitle, isAddWatermark = false, watermark: { type = 'text', text = 'WFT', image } }){
            try {
                const _self = this
                if(!blob) {
                    return console.error('[PDF Blob Is a required parameter]')
                }
                if(!isAddWatermark) { // 不添加水印
                    _self.preRightView(blob, docTitle)
                } else {
                    let bytes,imageType
                    if(type == 'image') {
                        if(!image) {
                        return console.error('["image" Is a required parameter]')
                        }
                        bytes = image.bytes
                        imageType = image.imageType
                    }
                    const map = {
                        // 'text': _self.addTextWatermark.bind(_self),
                        // 'image': _self.addImageWatermark.bind(_self),
                        'canvas': _self.addCanvasWatermark.bind(_self)
                    }
                    const pdfDoc =  PDFDocument.load(blob)
                    let params
                    if(type == 'text') params = { blob, pdfDoc, text, docTitle }
                    if(type == 'image') params = { blob, pdfDoc, bytes, imageType, docTitle }
                    if(type == 'canvas') params = { blob, pdfDoc, text, docTitle }
                    this.resultUrl = map[type](params)
                }
            } catch (error) {
                //console.log('Error fetching or adding watermark:', error);
                this.zlmlSpinning = false
            }
        },
        async addCanvasWatermark({ blob, pdfDoc1, text, docTitle }) {
            try {
                const pdfDoc =  await PDFDocument.load(blob)
                // 旋转角度大小
                const rotateAngle = Math.PI / 4;
            
                // labels是要显示的水印文字，垂直排列
                let labels = new Array();
                labels.push(text);
            
                const pages = pdfDoc.getPages()
            
                const size = pages[0].getSize()
            
                let pageWidth = size.width
                let pageHeight = size.height

                //console.log('画布的宽高，',size.width,'-',size.height)
                let canvas = document.createElement('canvas');
                let canvasWidth = canvas.width = pageWidth;
                let canvasHeight = canvas.height = pageHeight;
            
                const context = canvas.getContext('2d');
                context.font = "15px Arial";
            
                // 先平移到画布中心
                context.translate(pageWidth / 2, pageHeight / 2 - 250);
                // 在绕画布逆方向旋转30度
                context.rotate(-rotateAngle);
                // 在还原画布的坐标中心
                context.translate(-pageWidth / 2, -pageHeight / 2);
            
                // 获取文本的最大长度
                let textWidth = Math.max(...labels.map(item => context.measureText(item).width));
            
                let lineHeight = 15, fontHeight = 12, positionY, i
                i = 0, positionY = 0
                while (positionY <= pageHeight) {
                positionY = positionY + lineHeight * 5
                i++
                }
                canvasWidth += Math.sin(rotateAngle) * (positionY + i * fontHeight) // 给canvas加上画布向左偏移的最大距离
                //console.log('给canvas加上画布向左偏移的最大距离',Math.sin(rotateAngle) * (positionY + i * fontHeight))
                canvasHeight = 2 * canvasHeight
                for (positionY = 0, i = 0; positionY <= canvasHeight; positionY = positionY + lineHeight * 5) {
                // 进行画布偏移是为了让画布旋转之后水印能够左对齐;
                context.translate(-(Math.sin(rotateAngle) * (positionY + i * fontHeight)), 0);
                for (let positionX = 0; positionX < canvasWidth; positionX += 1.5 * textWidth) {
                    let spacing = 0;
                    labels.forEach(item => {
                    context.fillText(item, positionX, positionY + spacing);        
                    context.fillStyle = 'rgba(0, 0, 0, .2)'; // 字体颜色
                    spacing = spacing + lineHeight;
                    })
                }
                context.translate(Math.sin(rotateAngle) * (positionY + i * fontHeight), 0);
                context.restore();
                i++
                }
                // 图片的base64编码路径
                let dataUrl = canvas.toDataURL('image/png');
                // 使用Xhr请求获取图片Blob
                let xhr = new XMLHttpRequest();
                xhr.open("get", dataUrl, true);
                xhr.responseType = "blob";
                xhr.onload = res => {
                const imgBlob = res.target.response
                // 获取Blob图片Buffer
                imgBlob.arrayBuffer().then(async buffer => {
                    const pngImage = await pdfDoc.embedPng(buffer)
                    for(let i = 0; i < pages.length; i++) {
                    pages[i].drawImage(pngImage)
                    }
                    // 序列化为字节
                    const pdfBytes = await pdfDoc.save()
                    this.preView(pdfBytes, docTitle)
                })
                }
                xhr.send();
            } catch (error) {
                //console.log('Error fetching or adding watermark:', error);
                this.zlmlSpinning = false
            }
        },
        preView(stream, docTitle) {
            const blob = new Blob([stream], { type: 'application/pdf' });
            this.zlmlIframeSrc = URL.createObjectURL(blob);
            this.zlmlSpinning = false
        },
        noteDelete(val){
            var that = this
            this.$confirm({
                title:'您确认要删除吗？',
                // icon: createVNode(ExclamationCircleOutlined),
                onOk() {
                    spcySqsxWjjldeleteFileById({id:val.id}).then(res=>{
                        if(res.code == 200){
                            that.getNoteData(val,'删除')
                            // that.getMaterialSummary(val,'删除')
                            that.$message.success('删除成功')
                        }else{
                            that.$message.warning(res.message)
                        }
                    })
                },
                
            });
        },
        //--------------技术审评材料汇总
        getMaterialSummary(row,type){
            spcyqueryXcjcFileMl({sqsxid:this.currentRow.sqsxid}).then(res=>{
                if(res.code == 200){
                    //console.log('技术审评材料汇总',res.result)
                    this.materialSummaryList = res.result[0].mcList
                    if(type){
                        this.selectLastMeetingFile(row,type)
                    }else{
                        this.selectLastMeetingFile()
                    }
                }else{
                    this.$message.warning(res.message)
                }
            })
            spcyqueryWjMlBySchyJc({sqsxid:this.currentRow.sqsxid}).then(res=>{
                if(res.code == 200){
                    //console.log('审评组材料',res.result)
                    this.firstMeetingInspectionTeamList = res.result
                }else{
                    this.$message.warning(res.message)
                }
            })
            spcyqueryWjMlBySchyQy({sqsxid:this.currentRow.sqsxid}).then(res=>{
                if(res.code == 200){
                    //console.log('企业材料目录',res.result)
                    this.firstMeetingEnterpriseList = res.result.records
                }else{
                    this.$message.warning(res.message)
                }
            })
        },
        selectLastMeetingFile(row,type){
            if(type == '删除'){
                //console.log('我在删除文件',row)
                let num = ''
                this.currentLastMeetingData = {}
                this.materialSummaryList.forEach((item,index)=>{
                    if(row.index == index && item.wjList.length){
                        this.currentLastMeetingData = {...item,...item.wjList[0],index,tIndex:0}
                    }else if(item.wjList && item.wjList.length && num){
                        num = 1
                        this.currentLastMeetingData = {...item,...item.wjList[0],index,tIndex:0}
                    }
                })
                //console.log('我删除文件1',this.currentLastMeetingData)
            }else if(row){
                this.currentLastMeetingData = row
            }else{
                let num = ''
                this.materialSummaryList.forEach((item,index)=>{
                    if(item.wjList && item.wjList.length && !num){
                        num = 1
                        this.currentLastMeetingData = {...item,...item.wjList[0],index,tIndex:0}
                    }
                })
            }
            //console.log('我在末次会议材料汇总',this.currentLastMeetingData)
            this.lastMeetingSpinning = true
            this.lastMeetingIframeSrc = ''
            if(this.currentLastMeetingData.fwjlx == '.doc' || this.currentLastMeetingData.fwjlx == '.docx'){
                openFileReadOnly({id:this.currentLastMeetingData.id}).then(res=>{
                    if(res.code == 200){
                        //console.log('我一直在请求吗？',res.result.wordUrl)
                        this.lastMeetingIframeSrc = res.result.wordUrl
                    }else{
                        this.lastMeetingIframeSrc = ''
                    }
                    this.lastMeetingSpinning = false
                })
                
            }else{
                this.lastMeetingIframeSrc = bootConfig[process.env.NODE_ENV].locality_ApI + YchConstant.SPZX_SPCY + '/spcyRsWjmb/openWjjl?id='+this.currentLastMeetingData.id
                this.lastMeetingSpinning = false
            }
        },
        satisfactionClick(){
            this.$refs.QRQueryResultsRef.visibleQRQrCode = true
            this.$refs.QRQueryResultsRef.getData({sqsxid:this.currentRow.sqsxid})
        },

        eventupdatedSuccess(){
            this.modalSpinningPrice = false
        },
        tabPaneChange(val){
            if(val == '申请信息'  || val == '环节流转记录'){
                this.$refs.eventSetRef.getDatas({...this.currentRow,tabPaneActiveKey:val,borderisFalse:true})
                this.modalSpinningPrice = true
            }
            // if(val == '会议签到'){
            //     this.$nextTick(()=>{
            //         setTimeout(() => {
            //             this.$refs.onSiteInspectionCheckInIndexRef.getData({sqsxid:this.currentRow.sqsxid,fhylx:'首次会议'})
            //             this.$refs.onSiteInspectionCheckInMociRef.getData({sqsxid:this.currentRow.sqsxid,fhylx:'末次会议'})
            //         }, 200);
            //     })
            // }
            if(val == '审评方案拟定'){
                this.$nextTick(()=>{
                    setTimeout(() => {
                        this.$refs.planProductionProductionRef.getData({
                            sqsxid:this.currentRow.sqsxid,
                            isTopTabs:true,
                            isActiveKey:'审评方案拟定',
                            isDisabled:true,
                            fhjmc:this.currentRow.fhjmc,
                            reserveBottom:35,
                            rightPreviewBoxH:window.innerHeight - 80,
                            rightContentPreviewBoxH:window.innerHeight - 90,
                        })
                    }, 200);
                })
            }
            if(val == '审评报告'){
                this.$nextTick(()=>{
                    if(this.$refs.selectTemplateNoModelRef && this.$refs.selectTemplateNoModelRef.getSelectTemplate){
                        this.$refs.selectTemplateNoModelRef.getSelectTemplate({},'技术审评报告',this.selectReportItem.sqsxid,this.currentRow.fhbsxzt)
                        this.$refs.selectTemplateNoModelRef.selectTemplateVisible = true
                    }
                    
                })
            }
            if(val == '缺陷报告'){
                this.$nextTick(()=>{
                    if(this.$refs.selectTemplateNoModel2Ref && this.$refs.selectTemplateNoModel2Ref.getSelectTemplate){
                        this.$refs.selectTemplateNoModel2Ref.getSelectTemplate({},'技术审评缺陷记录表',this.selectReportItem.sqsxid,this.currentRow.fhbsxzt)
                        this.$refs.selectTemplateNoModel2Ref.selectTemplateVisible = true
                    }
                })
            }
        },
        async nextStepClick(val,num){
            if(val == '上一步'){
                await xcjcjdpreviousNode({sqsxid:this.currentRow.sqsxid}).then(res=>{
                    if(res.code == 200){
                        this.currentSteps = num
                    }else{
                        this.$message.warning(res.message)
                    }
                    this.$nextTick(()=>{
                        this.getxcjcbgData()
                        if(this.currentSteps == 0){
                            this.$refs.onSiteInspectionCheckInIndexRef.getData({sqsxid:this.currentRow.sqsxid,fhylx:'首次会议'})
                        }else if(this.currentSteps == 3){
                            this.getMaterialSummary()
                            this.$refs.onSiteInspectionCheckInMociRef.getData({sqsxid:this.currentRow.sqsxid,fhylx:'末次会议'})
                        }
                    })
                })
            }else{
                await xcjcjdnextNode({sqsxid:this.currentRow.sqsxid}).then(res=>{
                    if(res.code == 200){
                        this.currentSteps = num
                    }else{
                        this.$message.warning(res.message)
                    }
                    this.$nextTick(()=>{
                        this.getxcjcbgData()
                        if(this.currentSteps == 0){
                            this.$refs.onSiteInspectionCheckInIndexRef.getData({sqsxid:this.currentRow.sqsxid,fhylx:'首次会议'})
                        }else if(this.currentSteps == 3){
                            this.getMaterialSummary()
                            this.$refs.onSiteInspectionCheckInMociRef.getData({sqsxid:this.currentRow.sqsxid,fhylx:'末次会议'})
                        }
                    })
                })
            }
            if(num == 3){
                await this.getERWMData()
            }
            
        },
        //--------------描述模板---------
        getDescribeData(pagination,val,fmbly){
            this.describeLoading = true
            spcygetJcqkzgMb({...pagination,sqsxid:this.selectReportItem.sqsxid,fmbnr:val,fmbly:fmbly}).then(res=>{
                if(res.code == 200){
                    //console.log('审评情况专述----------',res.result.records)
                    if(res.result.records.length){
                        res.result.records.unshift({id:'-1',fmbnr:'情况专述',fdycs:'调用次数',})
                    }
                    this.describeList = res.result.records
                    this.totalDescribe = res.result.total
                    this.inputSearchKey = Date,now()
                    this.drawerKey = Date,now()
                    this.describeLoading = false
                    this.paginationKey = Date,now()
                }else{
                    this.$message.warning(res.message)
                    this.describeLoading = false
                }
                this.reportTabKey = Date.now()
            })
        },
        fmblyChange(){
            this.paginationDescribe.pageNo = 1
            this.paginationDescribe.pageSize = 10
            this.getDescribeData(this.paginationDescribe,this.fmbnrSearch,this.fmbly)
            

        },
        selectDescribe(){
            this.drawerVisible = true
            this.fmbnrSearch = ''
            this.paginationDescribe.pageNo = 1
            this.paginationDescribe.pageSize = 10
            this.getDescribeData(this.paginationDescribe,this.fmbnrSearch,this.fmbly)
        },
        addDescribe(){
            if(this.selectReportItem.fjcqkzs){
                spcyaddJcqkzsMb({sqsxid:this.selectReportItem.sqsxid,fmbnr:this.selectReportItem.fjcqkzs}).then(res=>{
                    if(res.code == 200){
                        this.$message.success(res.message)
                    }else{
                        this.$message.warning(res.message)
                    }
                })
            }else{
                this.$message.warning('请先输入审评情况专述')
            }
            
        },
        paginationChange(val,size){
            //console.log(val,size)
            this.paginationDescribe.pageNo = val
            this.paginationDescribe.pageSize = size
            this.getDescribeData(this.paginationDescribe,this.fmbnrSearch,this.fmbly)
            this.getSituationHistory()
            this.getProblemBase()
            this.getQueryTerms(this.chapterRow)
            this.getReportTemplateData(this.reportName)
            this.drawerKey = Date.now()
        },
        onSearchDescribe(val){
            this.fmbnrSearch = val
            this.getDescribeData(this.paginationDescribe,val,this.fmbly)
        },
        selelctDescribeText(val){
            this.selectReportItem.fjcqkzs = val
            this.drawerVisible = false
            this.reportTemplateVisible = false
        },
        deleteDescribe(val){
            var that = this
            this.$confirm({
                title:'您确认要删除吗？',
                    onOk() {
                        spcydeleteJcyj({id:val.id}).then(res=>{
                            if(res.code == 200){
                                that.getDescribeData(that.paginationDescribe,that.fmbnrSearch,that.fmbly)
                                that.getReportTemplateData(that.reportName)
                                that.$message.success(res.message)
                            }else{
                                that.$message.warning(res.message)
                            }
                        })
                    }
                })
        },

        //----------审评总体情况
        getOverallSituation(val,index){
            spcyqueryXcjczjByNowUser({sqsxid:val.sqsxid}).then(res=>{
                if(res.code == 200){
                    //console.log('获取章节----------',res.result.zjList)
                    this.overallNum.hjSize = res.result.hjSize
                    this.overallNum.wcSize = res.result.wcSize
                    this.overallNum.wwcSize = res.result.wwcSize
                    this.chapterList = res.result.zjList
                    this.chapterRow = res.result.zjList.length?{...res.result.zjList[index?index:0],index:index?index:0}:{}
                    this.getQueryQuestions(this.chapterRow)
                    this.overallKey = Date.now()
                }else{
                    this.$message.warning(res.message)
                }
                this.reportTabKey = Date.now()
            })
        },
        completeAllProjectClick(){//完成所有审评项目
            flfgverifyXcjczjWc({sqsxid:this.selectReportItem.sqsxid}).then(res=>{
                if(res.code == 200){
                    //console.log(res.result)
                    let index = 0
                    if(res.result && res.result.id){
                        this.chapterList.forEach((item,index)=>{
                            if(item.id == res.result.id){
                                //console.log('我在这一项',index)
                                this.chapterRow = {...item,index:index}
                                this.getQueryQuestions(this.chapterRow)
                            }
                        })
                        this.$message.warning('请先完成所有必填项')
                    }else{
                        flfgxcjczjplwc({sqsxid:this.selectReportItem.sqsxid}).then(res1=>{
                            if(res.code ==200){
                                this.$message.success(res1.message)
                                this.getOverallSituation(this.selectReportItem)
                            }else{
                                this.$message.warning(res1.message)
                            }
                        })
                    }
                }else{
                    this.$message.warning(res.message)
                }
            })
// flfgxcjczjplwc
        },
        getSituationHistory(){
            this.situationLoading = true
            this.chapterdrawerKey = Date.now()
            this.inputSearchKey = Date.now()
            spcygetXcjczjMsmbList({
                ...this.paginationDescribe,
                fxcjczjid:this.chapterRow.id,
                sqsxid:this.currentRow.sqsxid,
                fmbly:this.chapterRadio,
                fmbnr:this.searchSituationText,
            }).then(res=>{//获取情况描述
                if(res.code == 200){
                    //console.log('获取情况描述-------------',res.result.records)
                    if(res.result.records.length){
                        res.result.records.unshift({id:'-1',fmbnr:'描述模板',fdycs:'调用次数',})
                    }
                    this.situationList = res.result.records
                    this.totalDescribe = res.result.total
                }else{
                    this.$message.warning(res.message)
                }
                this.situationLoading = false
            })

        },
        selectSituationText(name,value,id,index,item){
            spcyselectHistoryMsmb({id:item.id}).then(res=>{
                if(res.code == 200){

                }else{}
            })
            //console.log(name,value,id,index)
            this.situationDescriptionVisible = false
            this.savechapter(name,value,id,index)
        },
        onSearchSituation(val){
            this.searchSituationText = val
            this.getSituationHistory()
        },
        //选择章节
        fzjmcClick(row,index){
            //console.log(row)
            this.chapterRow = {...row,index:index}
            this.getQueryQuestions(this.chapterRow)
        },
        //完成状态
        chapterStatusChange(row,index){
            //console.log(row)
            if(row.fwczt == '未完成'){
                flfgxcjczjwc(row).then(res=>{
                    if(res.code == 200){
                        this.getOverallSituation(this.selectReportItem,index)
                        this.$message.success(res.message)
                    }else{
                        this.$message.warning(res.message)
                    }
                })
            }else{
                flfgxcjczjcxbj(row).then(res=>{
                    if(res.code == 200){
                        this.getOverallSituation(this.selectReportItem,index)
                        this.$message.success(res.message)
                    }else{
                        this.$message.warning(res.message)
                    }
                })
            }
            
            
            // spcyupdatwXcjczj(row).then(res=>{
            //     if(res.code == 200){
            //         this.getOverallSituation(this.currentRow,index)
            //         this.$message.success(res.message)
            //     }else{
            //         this.$message.warning(res.message)
            //     }
            // })
        },
        chapterRadioChange(){//选择情况描述的类型
            this.getSituationHistory()
        },
        chapterTabPaneChange(){//选择章节情况

        },
        //选择情况描述
        situationClick(){
            this.paginationDescribe.pageNo = 1
            this.paginationDescribe.pageSize = 10
            this.situationDescriptionVisible = true
            this.getSituationHistory()
        },
        //保存情况描述
        savechapter(name,value,id,index){
            let data = {id:id}
            data[name] = value
            spcyupdatwXcjczj(data).then(res=>{
                if(res.code == 200){
                    this.$message.success(res.message)
                }else{
                    this,$message.warning(res.message)
                }
                this.getOverallSituation(this.selectReportItem,index)
            })
        },

        //-------------发现问题
        getQueryQuestions(row){//查询发现问题
            this.chapterIssuesSpinning = true
            this.chapterIssuesList = []
            spcyqueryListXcjcwtBySqsxId({sqsxid:this.selectReportItem.sqsxid,fxcjczjid:row.id}).then(res=>{
                if(res.code == 200){
                    //console.log('查询发现问题',res.result.records)
                    this.chapterIssuesList = res.result.records
                    this.chapterIssuesKey = Date.now()
                }else{
                    this.chapterIssuesList = []
                    this.$message.warning(res.message)
                }
                this.problemTableKey = Date.now()
                this.chapterIssuesSpinning = false
            })
        },
        //查询历史库列表
        getProblemBase(){
            spcyqueryPageXcjcHistoryTkListByXcjcZjId({
                ...this.paginationDescribe,
                sqsxid:this.currentRow.sqsxid,
                fxcjczjid:this.chapterRow.id,
                gjz:this.searchProblemHistoryText
            }).then(res=>{
                if(res.code == 200){
                    //console.log('查询问题历史库',res.result.records)
                    if(res.result.records.length){
                        res.result.records.unshift({id:'-1',fzdyznr:'问题内容',fzdyzh:'对应依据',})
                    }
                    this.problemHistoryList = res.result.records
                    this.totalDescribe = res.result.total
                    this.problemHistoryKey = Date.now()
                }else{
                    this.$message.warning(res.message)
                }
            })
        },
        //打开问题历史库
        problemBaseSelect(){
            this.paginationDescribe.pageNo = 1
            this.paginationDescribe.pageSize = 10
            this.problemHistoryVisible = true
            this.getProblemBase()
        },
        //搜索历史库
        onSearchProblemHistory(val){
            this.searchProblemHistoryText = val
            this.getProblemBase()
        },
        //选择问题历史库
        SelectproblemHistory(row){
            spcyselectHistoryXcjcwt({fxcjczjid:this.chapterRow.id,id:row.id, sqsxid:this.currentRow.sqsxid}).then(res=>{
                if(res.code == 200){
                    this.problemHistoryVisible = false
                    this.getQueryQuestions(this.chapterRow)
                    this.$message.success(res.message)
                }else{
                    this.$message.warning(res.message)
                }
            })
        },
        //添加问题
        addproblem(){
            spcyaddXcjcWt({sqsxid:this.selectReportItem.sqsxid,fxcjczjid:this.chapterRow.id}).then(res=>{
                if(res.code == 200){
                    this.$message.success(res.message)
                    this.getQueryQuestions(this.chapterRow)
                }else{
                    this.$message.warning(res.message)
                }
            })
        },
        //修改严重程度和问题描述
        severityChange(rowWt,name){
            //console.log(rowWt)
            let data = {id:rowWt.id}
            data[name] = rowWt[name]
            spcyupdatwXcjcwt(data).then(res=>{
                if(res.code == 200){
                    this.$message.success(res.message)
                }else{
                    this.$message.warning(res.message)
                }
                this.getQueryQuestions(this.chapterRow)
            })
        },
        //查询条款选择列表
        getQueryTerms(row){
            this.termItemLoading = true
            spcyqueryPageTkListByZjId({
                ...this.paginationDescribe,
                sqsxid:this.currentRow.sqsxid,
                fxcjczjid:row.id,
                gjz:this.searchTermItemText,
            }).then(res=>{
                if(res.code == 200){
                    if(res.result.records.length){
                        res.result.records.unshift({id:'-1',fzdyznr:'条款内容与审评要点',fzdyzh:'对应依据',})
                    }
                    this.termItemList = res.result.records
                    this.totalDescribe = res.result.total
                }else{
                    this.$message.warning(res.message)
                }
                this.termItemLoading = false
            })
        },
        //选择条款
        selectTermItem(item,trem){
            // this.currentTerms = {item:item.wt,trem:trem}
            // this.getQueryTerms(this.chapterRow)
            // this.termItemVisible = true
            //console.log(item)
            //console.log(trem)
            this.$refs.chooseTermsRef.getData({...item,...trem,sqsxid:this.selectReportItem.sqsxid})
            this.$refs.chooseTermsRef.visible = true
        },
        chooseTermsSuccess(){
            this.getQueryQuestions(this.chapterRow)
        },
        //条款搜索条件
        onSearchTermItem(val){
            this.searchTermItemText = val
            this.getQueryTerms(this.chapterRow)
        },
        //在列表上选择条款
        SelectTermItemItem(row){
            if(this.currentTerms.trem.ftkid){
                spcyagainXcjcwttk({ftkid:row.id,id:this.currentTerms.trem.id}).then(res=>{
                    if(res.code == 200){
                        this.$message.success(res.message)
                        this.getQueryQuestions(this.chapterRow)
                        this.termItemVisible = false
                    }else{
                        this.$message.warning(res.message)
                    }
                })
            }else{
                spcyaddXcjcwttk({ftkid:row.id,fxcjcwtid:this.currentTerms.item.id,sqsxid:this.selectReportItem.sqsxid}).then(res=>{
                    if(res.code == 200){
                        this.$message.success(res.message)
                        this.getQueryQuestions(this.chapterRow)
                    }else{
                        this.$message.warning(res.message)
                    }
                })
            }
        },
        deleteWTClick(row){//删除问题
            //console.log('删除问题',row)
            let that = this
            this.$confirm({
                title:'您确认删除吗？',
                // icon: createVNode(ExclamationCircleOutlined),
                onOk() {
                    spcydeleteXcjcwt({id:row.wt.id}).then(res=>{
                        if(res.code == 200){
                            that.$message.success(res.message)
                            that.getQueryQuestions(that.chapterRow)
                        }else{
                            that.$message.warning(res.message)
                        }
                    })
                }
            })
        },
        //删除条款
        deleteTermItem(row){
            let that = this
            this.$confirm({
                title:'您确认删除吗？',
                // icon: createVNode(ExclamationCircleOutlined),
                onOk() {
                    spcydeleteXcjcwttk({id:row.id}).then(res=>{
                        if(res.code == 200){
                            that.$message.success(res.message)
                            that.getQueryQuestions(that.chapterRow)
                        }else{
                            that.$message.warning(res.message)
                        }
                    })
                }
            })
            
        },
        //生成结论
        generateConclusion(name,value){
            spcygenerateXcjcConclusion({sqsxid:this.selectReportItem.sqsxid}).then(res=>{
                if(res.code == 200){
                    //console.log('生成结论',res)
                    this.selectReportItem[name] = res.result.conclusion
                    this.selectReportItem.fjcqxxm = res.result.fjcqxxm
                    this.saveData(name,res.result.conclusion)
                    this.saveData('fjcqxxm',res.result.fjcqxxm)
                    this.$message.success(res.message)
                }else{
                    this.$message.warning(res.message)
                }
            })
        },
        //审评报告
        programMemakeChange(row,name){
            spcygetXcjcbgFile({sqsxid:row.sqsxid}).then(res=>{
                //console.log('我再获取审评报告',res)
                this.programData = res.result.length?res.result[0]:{}
                if(res.result.length){
                    if(this.programData.fwjlx == '.doc' || this.programData.fwjlx == '.docx'){
                        this.openFileClick(this.programData,1)
                    }else{
                        this.programDataiframeSrc = bootConfig[process.env.NODE_ENV].locality_ApI + YchConstant.SPZX_SPCY + '/spcyRsWjmb/openWjjl?id='+this.programData.id
                    }
                    this.iframeKey = Date.now()
                }else{
                    this.$nextTick(()=>{
                        this.$refs.selectTemplateNoModelRef.getSelectTemplate({},'技术审评报告',row.sqsxid,this.currentRow.fhbsxzt)
                        this.$refs.selectTemplateNoModelRef.selectTemplateVisible = true
                    })
                }
                this.programKey = Date.now()
                // this.getMaterialSummary()
                this.reportTabKey = Date.now()
            })
        },
        defectReportChange(row){//生成缺陷报告
            spcygetXcjcqxbgFile({sqsxid:row.sqsxid}).then(res=>{
                this.defectReportData = res.result.length?res.result[0]:{}
                if(res.result.length){
                    if(this.defectReportData.fwjlx == '.doc' || this.defectReportData.fwjlx == '.docx'){
                        this.openFileClick(this.defectReportData,2)
                    }else{
                        this.defectReportDataiframeSrc = bootConfig[process.env.NODE_ENV].locality_ApI + YchConstant.SPZX_SPCY + '/spcyRsWjmb/openWjjl?id='+this.defectReportData.id

                        
                    }
                    this.iframeKey = Date.now()
                }else{
                    this.$refs.selectTemplateNoModel2Ref.getSelectTemplate({},'技术审评缺陷记录表',row.sqsxid,this.currentRow.fhbsxzt)
                    this.$refs.selectTemplateNoModel2Ref.selectTemplateVisible = true
                }
                this.defectReportKey = Date.now()
                // this.getMaterialSummary()
                this.reportTabKey = Date.now()
            })
        },
        xcjcbjChange(row){
            initWjgetXcjcblFile({sqsxid:row.sqsxid}).then(res=>{
                this.xcjcbjData = res.result.length?res.result[0]:{}
                if(res.result.length){
                    if(this.xcjcbjData.fwjlx == '.doc' || this.xcjcbjData.fwjlx == '.docx' ){
                        this.openFileClick(this.xcjcbjData,3)
                    }else{
                        this.xcjcbjiframeSrc = bootConfig[process.env.NODE_ENV].locality_ApI + YchConstant.SPZX_SPCY + '/spcyRsWjmb/openWjjl?id='+this.xcjcbjData.id
                    }
                    this.iframeKey = Date.now()
                }
                // else{
                //     this.$refs.selectTemplateNoModel2Ref.getSelectTemplate({},'技术审评缺陷记录表',row.sqsxid)
                //     this.$refs.selectTemplateNoModel2Ref.selectTemplateVisible = true
                // }
                this.defectReportKey = Date.now()
                this.reportTabKey = Date.now()
            })
        },
        
        
        openFileClick(val,num){//打开文件
            //console.log('打开文件',val,num)
            if(val.id){
                webOfficeApiopenFile({id:val.id}).then(res=>{
                    if(res.code == 200){
                        if(num == 1){
                            this.programDataiframeSrc = res.result.wordUrl
                        }else if(num == 2){
                            this.defectReportDataiframeSrc = res.result.wordUrl
                        }else if(num == 3){
                            this.xcjcbjiframeSrc = res.result.wordUrl
                        }
                        this.iframeKey = Date.now()
                    }else{
                        this.$message.warning(res.message)
                    }
                })
            }
            
        },

        refreshFile(){//刷新
            
            if(this.currentSteps == 1){
                this.xcjcbjChange(this.selectReportItem)
            }else{
                if(this.activeKey == '审评报告'){
                    this.programMemakeChange(this.selectReportItem)
                }else if(this.activeKey == '缺陷报告'){
                    this.defectReportChange(this.selectReportItem)
                }
            }
            
            
        },

        // downloadFiles(val){//下载
        //     //console.log(val)
        //     var that = this
        //     var fileName = val.fwjccmc
        //     let param = { fywflcode:'001002',id:val.id,sqsxid:this.currentRow.sqsxid}
        //     spcySqsxWjjlgetLocalFileById(param).then((data) => {
        //         if (!data) {
        //             that.$message.warning('文件下载失败')
        //         return
        //         }
        //             let url = window.URL.createObjectURL(new Blob([data], { type: blobType.type[blobType.suffix.indexOf(val.fwjlx)] }))
        //             let link = document.createElement('a')
        //             link.style.display = 'none'
        //             link.href = url
        //             link.setAttribute('download', fileName + val.fwjlx)
        //             document.body.appendChild(link)
        //             link.click()
        //             document.body.removeChild(link) //下载完成移除元素
        //             window.URL.revokeObjectURL(url) //释放掉blob对象
        //     })
        // },
        
        changeFileNameClick(row){
            this.changeFileNameVal = row.fwjxsmc
            this.changeFileNamevisible = true
        },
        changeFileNameHandleOk(){
            spcySqsxWjjlmodifyWjMc({id:this.currentXcjcNoteState.id,fwjxsmc:this.changeFileNameVal}).then(res=>{
                if(res.code == 200){
                    this.$message.success(res.message)
                    this.getNoteData(this.currentXcjcNoteState)
                    this.changeFileNamevisible = false
                }else{
                    this.$message.warning(res.message)
                }
            })
        },
        reEdit(){//重新编辑
            let data = {
                id:this.currentSteps == 1?this.xcjcbjData.id:this.activeKey == '审评报告'?this.programData.id:(this.activeKey == '缺陷报告'?this.defectReportData.id:'')
            }
            againEditPdfOnlineFile(data).then(res=>{
                if(res.code == 200){
                    this.$message.success(res.message)
                    this.refreshFile()
                }else{
                    this.$message.warning(res.message)
                }
            })
        },
        saveFiles(){//保存
            let data = {
                id:this.currentSteps == 1?this.xcjcbjData.id:this.activeKey == '审评报告'?this.programData.id:(this.activeKey == '缺陷报告'?this.defectReportData.id:'')
            }
            getWebOfficeDownloadFile(data).then(res=>{
                if(res.code == 200){
                    this.$message.success(res.message)
                    this.refreshFile()
                }else{
                    this.$message.warning(res.message)
                }
            })
        },
        
        generatePDFClick(){//生成PDF
            let data = {
                id:this.currentSteps == 1?this.xcjcbjData.id:this.activeKey == '审评报告'?this.programData.id:(this.activeKey == '缺陷报告'?this.defectReportData.id:'')
            }
            getDocxToPdf(data).then(res=>{
                if(res.code == 200){
                    this.$message.success(res.message)
                    this.refreshFile()
                }else{
                    this.$message.warning(res.message)
                }
            })
        },
        
        stampClick(){//盖章
            let data = {
                id:this.activeKey == '审评报告'?this.programData.id:this.defectReportData.id
            }
            pdfFileHcCa(data).then(res=>{
                if(res.code == 200){
                    this.$message.success(res.message)
                    this.refreshFile()
                }else{
                    this.$message.warning(res.message)
                }
            })
        },
        
        generatePDFStampClick(){//生成PDF并盖章
            let data = {
                id:this.activeKey == '审评报告'?this.programData.id:this.defectReportData.id
            }
            getDocxToPdfAndGz(data).then(res=>{
                if(res.code == 200){
                    this.$message.success(res.message)
                    this.refreshFile()
                }else{
                    this.$message.warning(res.message)
                }
            })
        },
        
        reSelectTemplate(){//重新选择模板
            this.$refs.selectTemplateRef.getSelectTemplate(
                this.activeKey == '审评报告'?this.programData:this.defectReportData,
                this.activeKey == '审评报告'?'技术审评报告':'技术审评缺陷记录表',
                this.currentRow.sqsxid)
            this.$refs.selectTemplateRef.selectTemplateVisible = true
        },
        //选择模板
        selectTemplateCompleteNoModel(val){
            if(val == '技术审评报告'){
                this.programMemakeChange(this.selectReportItem)
            
            }else{
                this.defectReportChange(this.selectReportItem)
            }
        },
        //旧
        getReportTemplateData(val){
            this.reportTemplateLoading = true
            if(val == '审评报告'){
                spcygetJcbgMb({...this.paginationDescribe,sqsxid:this.currentRow.sqsxid,fmbnr:this.reportTemplateSearchText,fmbly:this.reportTemplatefmbl}).then(res=>{
                    if(res.code == 200){
                        if(res.result.records.length){
                            res.result.records.unshift({id:'-1',fzdyznr:'条款内容与审评要点',fzdyzh:'对应依据',})
                        }
                        this.reportTemplateList = res.result.records
                        this.totalDescribe = res.result.total
                    }else{
                        this.$message.warning(res.message)
                    }
                    this.reportTemplateLoading = false
                })
            }else if(val == '缺陷报告'){
                spcygetQxbgMb({...this.paginationDescribe,sqsxid:this.currentRow.sqsxid,fmbnr:this.reportTemplateSearchText,fmbly:this.reportTemplatefmbly}).then(res=>{
                    if(res.code == 200){
                        if(res.result.records.length){
                            res.result.records.unshift({id:'-1',fzdyznr:'条款内容与审评要点',fzdyzh:'对应依据',})
                        }
                        this.reportTemplateList = res.result.records
                        this.totalDescribe = res.result.total
                    }else{
                        this.$message.warning(res.message)
                    }
                    this.reportTemplateLoading = false
                })
            }
        },
        
        reportTemplateRadioChange(){
            this.getReportTemplateData(this.reportName)
        },
        onSearchReportTemplate(val){
            this.reportTemplateSearchText = val
            this.getReportTemplateData(this.reportName)
        },
        //报告模板
        SelectReportTemplate(val){
            this.reportName = val
            this.paginationDescribe.pageNo = 1
            this.paginationDescribe.pageSize = 10
            this.getReportTemplateData(val)
            this.reportTemplateVisible = true
        },
        //存为报告模板
        saveReportTemplate(val,name){
            let data = {sqsxid:this.currentRow.sqsxid}
            data[name] = this.currentRow[name]
            if(this.currentRow[name]){
                if(val == '审评报告'){
                    spcyaddJcbgMb(data).then(res=>{
                        if(res.code == 200){
                            this.$message.success(res.message)
                        }else{
                            this.$message.warning(res.message)
                        }
                    })
                }else if(val == '缺陷报告'){
                    spcyaddQxbgMb(data).then(res=>{
                        if(res.code == 200){
                            this.$message.success(res.message)
                        }else{
                            this.$message.warning(res.message)
                        }
                    })
                }
                
            }else{
                this.$message.warning('请先输入'+val)
            }
        },
        
        editClick(val){
            this.$refs.serverEditingRef.getData(val)
        },
        refreshChange(){
            this.getMaterialSummary()
        },
        //宣读审评纪律
        recitingDisciplineCahnge(){
            this.$refs.recitingDisciplineRef.getData(this.currentRow.sqsxid)
            this.$refs.recitingDisciplineRef.visible = true
        },
        //选择模板
        selectTemplateComplete(val){
            this.getMaterialSummary()
        },
        initWjjlServe(val){//生成记录
            commoninitWjjl({sqsxid:this.selectReportItem.sqsxid,type:val}).then(res=>{
                if(res.code == 200){
                    this.$message.success(res.message)
                    // this.getMaterialSummary()
                }else{
                    this.$message.warning(res.message)
                }
            })
        },
        selectFileCahnge(val){//选择模板
            this.$refs.selectTemplateDownloadRef.getSelectTemplate({selectFileSaveType:'commoninitWjjl'},val,this.selectReportItem.sqsxid,this.selectReportItem.fhbsxzt)
            this.$refs.selectTemplateDownloadRef.selectTemplateVisible = true
        },
        //上传
        singleUploadCahnge({file},val){
            var that = this
            // if(file.name.indexOf('.pdf') !== -1){
                const fileData = new FormData();
                fileData.append("file",file);
                fileData.append("fywflcode",'001002');
                fileData.append("sqsxid",this.currentRow.sqsxid);
                fileData.append("type",val);
                spcyuploadSqsxFile(fileData).then(res => {
                    if(res.code !== 200){
                        that.$message.warning('请上传pdf文件或者联系管理员!')
                    }else{
                        that.getMaterialSummary(this.currentRow)
                        that.getFirstMeetingData(this.firstMeetingActiveValue)
                        that.$message.success('上传成功')
                    }
                    
                })
            // }else{
            //     this.$message.warning('请上传pdf文件')
            // }
            
        },
        singleUploadCahnge1({file},val){
            var that = this
            const fileData = new FormData();
            fileData.append("file",file);
            fileData.append("fywflcode",'001002');
            fileData.append("sqsxid",this.currentRow.sqsxid);
            fileData.append("type",val);
            spcyuploadSqsxFile(fileData).then(res => {
                //console.log(res)
                if(res.code !== 200){
                    that.$message.warning('请上传pdf文件或者联系管理员!')
                }else{
                    that.getNoteData()
                    that.$message.success('上传成功')
                }
                
            })
            
        },
        producerUpload({file},val){//
            var that = this
            const fileData = new FormData();
            fileData.append("file",file);
            fileData.append("fywflcode",'001002');
            fileData.append("sqsxid",this.currentRow.sqsxid);
            fileData.append("id",val.id);
            uploadPdfFileById(fileData).then(res => {
                if(res.code !== 200){
                    that.$message.warning('请上传pdf文件或者联系管理员!')
                }else{
                    that.getMaterialSummary(this.currentRow)
                    that.$message.success('上传成功')
                }
                
            })
        },
        //删除
        producerDelete(val){
            var that = this
            this.$confirm({
                title:'您确认要删除吗？',
                // icon: createVNode(ExclamationCircleOutlined),
                onOk() {
                    spcySqsxWjjldeleteFileById({id:val.id}).then(res=>{
                        if(res.code == 200){
                            that.getMaterialSummary(val,'删除')
                            that.$message.success('删除成功')
                        }else{
                            that.$message.warning(res.message)
                        }
                    })
                },
                
            });
            
        },
        //查看pdf
        viewClick(val){
            this.$refs.serverEditingViewRef.getData({id:val.id,fwjlx:val.fwjlx})
            this.$refs.serverEditingViewRef.serverEditingVisible = true
        },
        packageDownloadClick(){//打包下载
            var fileName = '企业材料'
            spcydownZipZxclQy({sqsxid:this.currentRow.sqsxid}).then((data) => {
                if (!data) {
                    that.$message.warning('文件下载失败')
                return
                }
                    let url = window.URL.createObjectURL(new Blob([data], { type: blobType.type[blobType.suffix.indexOf('.zip')] }))
                    let link = document.createElement('a')
                    link.style.display = 'none'
                    link.href = url
                    link.setAttribute('download', fileName + '.zip')
                    document.body.appendChild(link)
                    link.click()
                    document.body.removeChild(link) //下载完成移除元素
                    window.URL.revokeObjectURL(url) //释放掉blob对象
            })
        },
        taskAllocationClick(){//分配任务
            this.$emit('taskAllocationClick',this.reportList,this.currentRow.fhbsxzt == 1)
        },
        //下载模板
        downloadTemplateCahnge(val){
            var that = this
            var fileName = val+'模板'
            let param = { fywflcode:'001002',type:val,sqsxid:this.currentRow.sqsxid}
            spcydownloadSqsxFileMb(param).then((data) => {
                if (!data) {
                    that.$message.warning('文件下载失败')
                return
                }
                    let url = window.URL.createObjectURL(new Blob([data], { type: blobType.type[blobType.suffix.indexOf('.doc')] }))
                    let link = document.createElement('a')
                    link.style.display = 'none'
                    link.href = url
                    link.setAttribute('download', fileName + '.doc')
                    document.body.appendChild(link)
                    link.click()
                    document.body.removeChild(link) //下载完成移除元素
                    window.URL.revokeObjectURL(url) //释放掉blob对象
            })
        },
        linkClick(){
            var link = document.createElement('a');
            link.target='_blank'
            link.href = bootConfig[process.env.NODE_ENV].EXTERNAL_ACCESS_URL2+process.env.BASE_URL+`businessManagementSatisfactionSurvey?obj=`+JSON.stringify({sqsxid:this.currentRow.sqsxid})|| "二维码生成中",
            link.click();
        },
        generateFilesClick(){//生成会议签到表
            sqsxYwxxHtmlToFileByXcjchy({sqsxid:this.currentRow.sqsxid}).then(res=>{
                if(res.code == 200){
                    this.getMaterialSummary(this.currentRow)
                    this.getFirstMeetingData(this.firstMeetingActiveValue)
                    this.$message.success(res.message)
                }else{
                    this.$message.warning(res.message)
                }
            })
        },
        signatureFormCahnge(val){//下载签字表
            if(val == '技术审评会议签到表'){
                sqsxYwxxdownHtmlToFileByXcjchy({sqsxid:this.currentRow.sqsxid}).then((data)=>{
                    if (!data) {
                        that.$message.warning('文件下载失败')
                        return
                    }
                    let url = window.URL.createObjectURL(new Blob([data], { type: blobType.type[blobType.suffix.indexOf('.docx')] }))
                    let link = document.createElement('a')
                    link.style.display = 'none'
                    link.href = url
                    link.setAttribute('download', val + '.docx')
                    document.body.appendChild(link)
                    link.click()
                    document.body.removeChild(link) //下载完成移除元素
                    window.URL.revokeObjectURL(url) //释放掉blob对象
                })
            }else{
                sqsxYwxxdownHtmlToFileByXcjcjl({sqsxid:this.currentRow.sqsxid}).then((data)=>{
                    //console.log(data)
                    if (!data) {
                        that.$message.warning('文件下载失败')
                        return
                    }
                    let url = window.URL.createObjectURL(new Blob([data], { type: blobType.type[blobType.suffix.indexOf('.docx')] }))
                    let link = document.createElement('a')
                    link.style.display = 'none'
                    link.href = url
                    link.setAttribute('download', val + '.docx')
                    document.body.appendChild(link)
                    link.click()
                    document.body.removeChild(link) //下载完成移除元素
                    window.URL.revokeObjectURL(url) //释放掉blob对象
                })
            }
        },
        downloadFiles(val){//下载
            var that = this
            
            var fileName = val.fwjxsmc?val.fwjxsmc:val.fwjccmc
            let param = { fywflcode:'001002',id:val.id,sqsxid:this.currentRow.sqsxid}
            spcySqsxWjjlgetLocalFileById(param).then((data) => {
                if (!data) {
                    that.$message.warning('文件下载失败')
                return
                }
                    let url = window.URL.createObjectURL(new Blob([data], { type: blobType.type[blobType.suffix.indexOf(val.fwjlx)] }))
                    let link = document.createElement('a')
                    link.style.display = 'none'
                    link.href = url
                    link.setAttribute('download', fileName + val.fwjlx)
                    document.body.appendChild(link)
                    link.click()
                    document.body.removeChild(link) //下载完成移除元素
                    window.URL.revokeObjectURL(url) //释放掉blob对象
            })
        },

        //提交技术审评任务
        submitOnSite(val){
            this.$emit('linkHandling',val)
        },
        //保存
        saveData(name,value,obj){
            let data = {
                jobid:this.currentRow.jobid,
                sqsxid:this.currentRow.sqsxid,
                opinion:'',
                smgflag:'否',
                map:{}
            }
            if(name){
                data.map[name] = value
            } else if(obj){
                data.map = {...obj}
            } else{
                data.map = { ...this.currentRow,}
            }
            if(this.currentRow.fhbsxzt == 1){
                data.sqsxid = this.selectReportItem.sqsxid
                spcysaveJbxx(data).then(res=>{
                    if(res.code == 200){
                        this.$message.success(res.message)
                    }else{
                        this.$message.warning(res.message)
                    }
                    this.getReportDetails()
                })
            }else{
                spcysaveFlow(data).then(res=>{
                    if(res.code == 200){
                        this.$message.success(res.message)
                    }else{
                        this.$message.warning(res.message)
                    }
                    this.successChange()
                })
            }
            
        },
        successChange(val){
            //console.log('到这里了吗？')
            if(val){
                this.refreshTable = Date.now()
            }else{
                this.$emit('reviseClick',{...this.currentRow,isSssignPersonnel:true,noFirstLoad:true})
            }
            
        },
        
    }
}
</script>
<style lang="less">
//1
.on-siteInspection-div-3{
    width: 100%;
    padding: 2px 5px 5px 5px;
    overflow-y: auto;
    // background-color: #fff;
    // .on-siteInspection-tabs{
    //     padding: 0 5px;
    //     background-color: #fff;
    //     position: relative;
    //     // top: 48px;
    //     top: 0;
    //     right: 0;
    //     // margin:0 10px;
    //     font-size: 20px !important;
    //     font-weight: 600 !important;
    //     .ant-tabs-bar{
    //         margin: 0;
    //     }
    //     .ant-tabs-nav .ant-tabs-tab{
    //         padding-top: 5px;
    //         padding-bottom: 5px;
    //         margin-right: 10px;
    //     }
    //     .ant-tabs-nav-container{
    //         height: 50px !important;
    //     }
    //     .ant-tabs-nav-scroll{
    //         padding-top: 10px;
    //         padding-left: 10px;
    //     }
    // }
    // .ant-tabs-tab-active{
    //     font-size: 16px;
    //     font-weight: 600 !important;
    // }
    // .ant-tabs-tab{
    //     font-size: 16px;
    //     font-weight: 600 !important;
    //     line-height: 28px !important;
    //     border-radius: 10px 10px 0 0 !important;
    // }
    // .ant-tabs-tab-active{
    //     background-color: #5ca3e5 !important;
    //     color: #fff !important;
    //     border-color: #5ca3e5 !important;
    //     box-shadow: 0px 0px 12px 0px #5ca3e5;
    // }
    // .on-siteInspection-content{
    //     margin-top: 10px;
    //     height: calc(100vh - 145px);
    //     overflow-y: auto;
    //     box-shadow: 0px 0px 12px 0px #5ca3e5;
    // }
    .ant-steps-item-title{
        font-weight: 600 !important;
        font-size: 18px;
    }
    .sceneInspect-left-bgBox{
        width: 10%;
        border: 1px solid #d9d9d9;
        margin-right: 5px;
        background-color: #fff;
        
        .left-bgBox-item{
            padding: 5px;
            padding-left: 8px;
            font-size: 16px;
            font-weight: 600;
            margin-bottom: 5px;
            border: 1px solid #d9d9d9;
            border-radius: 15px;

        }
        .select-left-bgBox-item{
            background-image: linear-gradient(to bottom, #e7f3ff, #fff, #e7f3ff, #e7f3ff, #e7f3ff, #e7f3ff, #e7f3ff, #e7f3ff, #e7f3ff);
            background-size: 100% 100% !important;
            border: 2px solid #ff9200;
            color: #38f;
        }
    }
    .sceneInspect-right-zlckBox{
        width: 40%;
        border: 1px solid #d9d9d9;
        margin-left: 5px;
    }
    .left-bgBox-top{
        display: flex;
        align-items: center;
        font-size:18px;
        border-bottom:2px solid #d9d9d9;
        margin-bottom:10px;
        background-image: linear-gradient(to bottom, #e7f3ff, #fff, #e7f3ff, #e7f3ff, #e7f3ff, #e7f3ff, #e7f3ff, #e7f3ff, #e7f3ff);
        background-size: 100% 100% !important;
        padding:5px;
        .title{
            flex: 1;
            color:#38f;
            font-weight:600;
        }
    }
    .on-siteInspection-content{
        overflow-y: auto;
        padding: 10px;
        // margin: 5px;
        background-color: #fff;
        border-top: 0 !important;
    }
    .nextStep-box{
        display: flex;
        justify-content: space-between;
        align-items: center;
        // position: absolute;
        // width: calc(100% - 12px);
        // bottom: -50px;
        // left: 6px;
        // background-color: #fff;
        // border-top: 1px solid #d9d9d9;
        padding: 0px 0;
    }
    .top-nextStep-box{
        position: absolute;
        right: 0;
        top: -5px;
    }
    .steps-item-icon-box{
        width: 24px;
        height: 24px;
        border: 1px solid rgba(0, 0, 0, 0.25);
        line-height: 23px;
        border-radius: 50%;
        background-color: #fff;
        text-align: center;
        font-size: 14px;
    }
    .ant-steps-item-active{
        .steps-item-icon-box{
            border: 1px solid #2F54EB;
            background-color: #2F54EB;
            color: #fff;
        }
    }
    .ant-steps-item-finish{
        .steps-item-icon-box{
            color: #2F54EB;
            border: 1px solid #2F54EB;
        }
        
    }
    
}
//2
.on-siteInspection-div-3{
    .review-table{
        th{
            text-align: center;
            padding: 10px;
        }
        td{
            padding: 10px;
        }
    }
    th{
        padding: 10px;
        text-align: center;
    }
    td{
        padding: 5px;
    }
    .file-for-box{
        display: flex;
        flex-wrap: wrap;
        .toolbox-fileList-box{
            // width: 104px;
            // height: 98px;
            // margin: 10px;
            padding: 5px;
            margin: 5px;
            margin-left: 0;
            display: flex;
            flex-direction: column;
            justify-content: center;
            overflow: hidden;
            border: 1px solid #d9d9d9;
            .fileList-icon-btn{
                // flex: 1;
                display: flex;
                justify-content: space-around;
                .toolbox-filePdf-icon-type{
                    font-size: 40px;
                    color: #229dfc;
                    display: inline-block;
                    margin-top: 8px;
                }
                .left-icon-btn,.right-icon-btn{
                    padding: 7px 0;
                    width: 15px;
                    display: flex;
                    flex-direction: column;
                    justify-content: space-between;
                }
                .toolbox-delete-icon-type{
                    color: #ed5565;
                }
                .toolbox-eye-icon-type{
                    color: #1ab394;
                    display: inline-block;
                    margin-top: 8px;
                }
                .toolbox-download-icon-type{
                    color: #229dfc;
                }
                .toolbox-upload-icon-type{
                    color: #229dfc;
                    display: inline-block;
                    margin-top: 8px;
                }
            }
            .toolbox-file-coontern{
                display: flex;
                justify-content: center;
                align-items: center;
                padding: 0 3px;
                // height: 42px;
                .toolbox-file-name{
                    
                    // flex: 1;
                    text-align: center;
                    display: -webkit-box;
                    overflow: hidden;
                    text-overflow: ellipsis;
                    -webkit-line-clamp: 2; /* 控制最大行数 */
                    -webkit-box-orient: vertical;
                }
            }
        }
        .select-last-meeting-box{
            background-image: linear-gradient(to bottom, #e7f3ff, #fff, #e7f3ff, #e7f3ff, #e7f3ff, #e7f3ff, #e7f3ff, #e7f3ff, #e7f3ff);
            background-size: 100% 100% !important;
            border: 3px solid #ff9200 !important;
        }
    }
    .file-for-v{
        width: 130px;
        height: 130px;
        border-radius: 2px;
        border: 1px solid #d9d9d9;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        padding: 5px;
        margin: 5px;
        .file-icon-box{
            display: flex;
            justify-content: space-evenly;
            .file-icon-v{
                font-size: 42px;
                color: rgb(24, 144, 255);
                padding: 7px 0;
            }
            .left-box{
                // width: 28px;
            }
            .right-box{
                display: flex;
                flex-direction: column;
                justify-content: space-between;
                padding-bottom: 2px;
                .eye-icon-v{
                    font-size: 18px;
                    color: rgb(24, 144, 255);
                }
            }
            .fileicon-v{
                font-size: 18px;
                // color: rgb(24, 144, 255);
                color: #2F54EB;
            }
            .deleteicon-v{
                color: #ed5565;
            }
        }
        
        .name-fclmc-text{
            height: 60px;
            text-align: center;
            display:block;
            text-overflow: -o-ellipsis-lastline;
            overflow: hidden;
            text-overflow: ellipsis;
            display: -webkit-box;
            // display: flex;
            // flex-direction: column;
            // justify-content: center;
            -webkit-line-clamp: 3;
            line-clamp: 3;
            -webkit-box-orient: vertical;
            font-size: 14px;
        }
    }
    .chapter-tabs{
        .ant-tabs-bar{
            border: 0px;
            margin: 0;
        }
        .ant-tabs-nav .ant-tabs-tab{
            margin-right: 10px;
        }
        .ant-tabs-nav-container{
            height: 50px !important;
        }
        .ant-tabs-nav-scroll{
            padding-top: 10px;
            padding-left: 10px;
        }
        .ant-tabs-nav .ant-tabs-tab{
            // padding: 10px;
            line-height: 40px !important;
            border-radius: 10px 10px 0 0 !important;
        }
        
        .ant-tabs-tab-active{
            background-color: #5ca3e5 !important;
            color: #fff !important;
            border-color: #5ca3e5 !important;
            box-shadow: 0px 0px 12px 0px #5ca3e5;
        }
        
        // .on-siteInspection-div .chapter-tabs .ant-tabs-nav .ant-tabs-tab{
        //     padding: 3px 10px;
        // }
        
    }
    .chapter-tabs-content{
        // box-shadow: 0px 0px 12px 0px #5ca3e5 !important;
        // box-shadow: 0px 0px 12px -3px #69a3d9 !important;
        border: 1px solid #38f;
        border-top: none;
        background-color: #fff;
        // margin: 5px;
        padding: 10px;
        .discover-problems-item-box{
            box-shadow: 0px 0px 2px 2px #caedff;
            border-radius: 5px;
            margin: 5px 5px 15px 5px;
            padding: 5px;
            .problem-title{
                // background: rgba(0, 0, 0, 0.75);
                background: #faad14;
                color: #fff;
                padding: 0 5px;
                display: inline-block;
                margin-right: 18px;
                font-size: 18px;
                border-radius: 3px;
            }
            .qxms-box{
                flex: 1;
                height:156.2px;
                border:1px solid #d9d9d9;
                margin-right:3px;
                padding:5px;
            }
            .qxyj-box{
                flex: 1;
                height:156.2px;
                border:1px solid #d9d9d9;
                margin-left:3px;
                padding:5px;
                .qxyj-content{
                    height:126.2px;
                    overflow-y:auto;
                }
                .ant-empty-image{
                    height:60px !important;
                }
            }
            .wt-item-top-box{
                display:flex;
                align-items:center;
                .tips-box{
                    font-weight:600;
                    font-size:16px;
                    color:#ED5566;
                }
                .wt-item-title{
                    font-weight:600;
                }
            }
        }
    }
    .discover-problems-readOnly-box{
        height: calc(100vh - 427px);
        overflow-y: auto;
        margin: 5px;
        .problems-readOnly-item{
            margin-top: 8px;
            .item-title{
                font-size: 16px;
                font-weight: 600;
                color: #38f;
            }           
        }
        
    }
    .first-meeting-content-box{
        .content-tabs-item-box{
            display: flex;
            height: calc(100vh - 400px);
            overflow-y: auto;
            border: 1px solid rgb(51, 136, 255);
            border-top: none;
        }
    }
    .xcjvbj-coontent-v{
        .XcjcNote-item-box{
            font-weight: 600;
            color: #2F54EB;
        }
        .select-XcjcNote-box{
            background-image: linear-gradient(to bottom, #e7f3ff, #fff, #e7f3ff, #e7f3ff, #e7f3ff, #e7f3ff, #e7f3ff, #e7f3ff, #e7f3ff);
            background-size: 100% 100% !important;
            border: 3px solid #ff9200;
            color: #2F54EB !important;
        }
    }
}
.plan-materials-full-modal{
    .ant-modal {
        max-width: 100%;
        top: 0;
        padding-bottom: 0;
        margin: 0;
    }
    .ant-modal-content {
        display: flex;
        flex-direction: column;
        height: calc(100vh);
    }
    .ant-modal-body {
        flex: 1;
        height: calc(100vh - 50px);
        padding:8px;
    }
}


</style>